When things don't work you try different things. You may have inadvertently shut off the power.
You didn't respond about the uninterruptable power supply (backup battery, in case you don't know) or a power strip/ surge protector.
You could take the time to read the label, or if this is a brand name computer, post the full model number.
All power supplies are NOT the same. Even if the power supply is the problem, you need to know what capacity to get as a replacement. The brand will tell us the likely hood that the power supply is the problem. Some are much less reliable than others.
You have given us nothing to go on yet.