You may have damaged the power supply. The best way to find out:
1. shut down PC
2. unplug from wall
3. hit the power button to expel any charge left in the computer
4. turn off the power supply manually from the switch on the back
5. press the power button again a few times
6. plug back in, turn power supply back on, and power up the computer.
If the problem still happens, then try doing those steps again, but instead, removing the 20/24 pin connector from the power supply on the inside that connects to the motherboard. This should be the single-most largest connector in the computer and if you're unsure of what it looks like, it'll look something like this.
After you unplug the motherboards main power, also unplug the processor's power plug. The plug looks like the middle picture in the image below.
This plug is normally located near the processor somewhere and is an 8-pin connector. After doing that, try plugging the computer back in normally, turn on the power supply, and try booting up the computer again. Check to see if the power supply turns off quickly like before. If the problem
keeps on occuring then you almost assuredly have a bad power supply and you shouldn't try using it until you get another. If it works "fine" and doesn't shut off instantly then the answer is one of two things. A.) the power supply might be good after all or B.) You could have damaged one of the power supplies ways of powering something major, like the processor or the motherboard, and again, the power supply should be replaced.
If you feel the power supply is going out, be careful! Don't use the computer at all unless you absolutely have to. I say this because the power supply is like the heart of the computer. Without the juice flowing, the computer won't work, but equally as damaging, the power supply can cause all sorts of problems by frying additional components inside the computer and you don't want to take that risk.
Lemme know how it goes. I might not be able to respond again until around 7-8:00 PM Eastern Time today.
-DarkPacMan77-