How many apps do you have running in the background and how many do you have set to start when your Mac starts?
In addition, you stated when “switching between accounts”. Do you fast switch or are you logging out of one account and then logging into another. If the former, how many accounts do you have open simultaneously and how many apps are running in the background while the accounts are open?
I still have a late 2011 iMac and Mac Mini model that was doing the same thing. I upgraded the memory to 16 gigs and replaced the IDE hard drive with an SSD and it was a night and day difference. Is that an option for that model? If so you might want to look into it if you want to keep it a while longer.
Hard disks are tough to diagnose. I'd really suggest for your next Mac that you budget getting a model with a SSD.
would a refurbished be better than a new one. I just googled adding a hard drive to my late 2015. where do you suggest I get that done if my local Apple store is closed
I was going to take a picture of this message on my Mac picture I just got but it went away and restarted. I was just on Facebook and all of a sudden it went black and some message popped up saying because of a problem it needed to restart. After doing a health check on my hard drive with Apple Support over text about three days ago I couldn’t find anything wrong with it but obviously there’s something wrong.