Adding to the excellent suggestions above — here are a few more things to check on your 2020 iMac:
1. Check for macOS power management issues:
- Open System Settings → Energy Saver
- Make sure "Put hard disks to sleep when possible" is UNCHECKED
- This setting can cause Time Machine drives to spin down and disconnect unexpectedly
2. Check USB/Thunderbolt port health:
- Try plugging the backup drive into a different USB/Thunderbolt port on your iMac
- If the issue stops, the original port may be failing
- Also try a known-good cable, as frayed cables are a very common culprit
3. Check disk health with Disk Utility:
- Open Finder → Applications → Utilities → Disk Utility
- Select your Time Machine drive and click First Aid
- If errors are found and can't be repaired, the drive may be failing
4. Review Console logs for clues:
- Open Console (Applications → Utilities → Console)
- Search for "disk" or "TimeMachine"
- Look for repeated error messages around the time of disconnections — these can point to whether it's a hardware or software cause
5. Reset SMC on the iMac:
- Shut down the iMac
- Unplug the power cord, wait 15 seconds, plug back in
- Wait 5 seconds, then press the power button
- The SMC controls USB power management and resetting it often fixes USB dropout issues
Since this started for no apparent reason, the SMC reset and Energy Saver settings are worth trying first. Hope it gets resolved!