if its not mechanical, like dust filters/inlets/outlets blocked, kept in an enclosed space like a cabinet, next to a heater, stuck/sluggish fans, cpu thermal paste failing..
it could not be overheating at all, the power supply could be failing / underpowered for your PC when it's running at maximum
or it could be malware(does it sound like your fans are working hard when your pc isn't doing anything?)
or if none of those, could be some other failed component generating too much heat, or something too smart for me to help with
https://www.cpuid.com/softwares/hwmonitor.html
that program will show you the temps of your components. if the temps dont actually get too high, it's *probably* power supply. mayb idk i didnt go to college :<