Thanks for that.
Well, since all these devices seem to be going offline at the same time it stands to reason that they are related. If a particular USB device is causing the problem this will help us learn which. It could be either USB or a bluetooth problem. Or something else. If we start with the easy things first maybe we'll get lucky.
USB devices, their enclosures and cables are notorious for failure and causing problems. See how your Mac works for a while with all devices disconnected.
And, since you've upgraded from Catalina (?) to Big Sur, it could be a software problem.
Let's also get you to run an EtreCheck evaluation on your iMac. The problem could be anything from a simple malware installation to a hardware failure. Some things are fairly easy to fix.
EtreCheck is a diagnostic app that gathers and reports important debugging information about your Macintosh. It is very highly regarded and meant to be used with Apple Support Communities to help others help you troubleshoot and resolve your Mac problems.
Please navigate to EtreCheck.com and download the free version of EtreCheck. Once you’ve run the app and created your report please post it with your reply to this message.
You must upload the full report. For instructions on how to attach your EtreCheck report to your reply, please click How to use Add Text when posting…
We can use the EtreCheck report to look for the more obvious things that may be causing your problem and advise how to correct them.