My computer just randomly shuts down after a minute and some times when it goes off and I try to turn it on again it turns on for 1 second then turn off
I would suggest remove all the cabinet connectors from motherboard like power button, reset button etc. Turn on your pc directly from motherboard with the help of screw driver. Problem might be in your power button if pc starts up normally.