We don't know your computer make or model number, operating system installed, laptop or desktop, etc. The more information you give us, then better informed our answer will be.

In the meantime, when was the last time you took the cover off the computer and used compressed air to blow out the dust from around the processor, heatsink, power supply, and all vents and fans.

Have you got a spare power supply unit which you can swap in for the current one? If so, give it a try.

If your power cord is plugged into a battery backup, try removing the battery backup from the equation and simply plug the cord into the wall socket.

Hope this helps and let us know more.

Grif