If you are talking about a standard desktop PC then it is highly likely that the power supply unit (PSU) is an ATX type. When these first came on the scene it allowed the PC via software to switch itself off. To do that the PC removes a voltage from the interface which tells the PSU to power down.
So if your motherboard is not returning this signal to the PSU then the PSU will not stay on.
This web page explains how to convert an ATX PSU to a bench PSU by spoofing this signal:
https://www.electronics-tutorials.ws...ch-supply.html
I assume that you have tried replugging the PSU into the mobo?
The fault could be either of the PSU, the mobo, or simply a poor connection (dry joint/corrosion) between the two.
The PSU will not stay on if it doesn't see a feedback signal from the mobo telling it to do so.