Once it cools down & charges up, try one of these two..
Are you running any VPN, Anti-Virus, or Cleaning apps?
We need to see what all is running, a report from this will not display any personal info...
Using EtreCheck - Apple Community
EtreCheck is a FREE simple little diagnostic tool to display the important details of your system configuration and allow you to copy that information to the Clipboard. It is meant to be used with Apple Support Communities to help people help you with your Mac. It will not display any personal info.
https://www.etrecheck.com/
Thanks for Old Toad’s etrecheck instructions…
Slow iMac 2017 - Apple Community
Or as a test... Safe Boot...
Start with this of M1 or M2 Mac...
On your Mac, choose Apple menu > Shut Down.
Wait for your Mac to shut down completely. A Mac is completely shut down when the screen is black and any lights (including in the Touch Bar) are off.
Press and hold the power button on your Mac until “Loading startup options” appears.
Select a volume.
Press and hold the Shift key, then click Continue in Safe Mode.
The computer restarts automatically. When the login window appears, you should see “Safe Boot” in the menu bar.
Restart normally.
Start with this if IntelMac...
Safe Boot, (holding Shift key down at startup), does the problem occur in Safe Mode? Could take 10 minutes or more.
Safe mode attempts to repair Disks & clears lots of caches & loads safe Drivers, & prevents loading of 3rd party extensions, so if Safe Mode works try again in regular boot.
To find out if it's system wide or user specific, try this...
Open System Preferences>Users & Groups, unlock the lock, click on the little plus icon, make a new admin account, log out & into the new account.
Does it work in the new account?