I personally know and support the following anti-malware developers, which are either free or have free trials that will take care of all known Mac malware (including adware) and are low impact.
Great suggestion from Al; it sounds like to me you’re getting something akin to bitcoin miner malware, running background from your spare CPU.
You might also try an adblocker, such as uBlock ( search this forum for instructions on how to not get the useless ripoff of the same name) or 1Blocker X or even Adblock or Ghostery long enough to see if you’ve getting roughed around.
It would also be worth trying Safari under a fresh temp user account going to only trusted, dissimilar pages; if it’s happy there, you may just need to nuke your caches, and possibly history.
Repeat a fresh test in your environment to be sure before you nuke ( if you care).
If you don’t want to lose your current session(s), save them as tab sets and try starting with a single trusted page in your own user space.
Also, be sure to try turning off all your extensions and plugins temporarily.
Addendum: if you’re loathe to nuke your cookies, you can temporarily drag both history and cookies out and reopen a known-problematic tab set for testing.
Finally, I assume you’ve tried just restarting the Mac? One might also try Safe boot and Safe User modes to make certain it’s not an app, utility, etc., in background.