Chosen Solution

Xbox beeps, lights up then shuts off.

We get people asking about their Xbox powering off 1-5 seconds here all the time. It’s almost always the PSU that has gone bad. Replacing the PSU should help. Xbox One S Power Supply Xbox One S Power Block Replacement

Try using a blow dryer on the top vent for a bit, then try turning it back on. Found that fix on another website.

I can’t use my controller to turn it on when I try to hold the power button but that does not work I looked on YouTube but that did not work

Usually the problem occurs when water reaches the fans or the psu (power supply) or it overheats because of the safety lock that occurs when a lot of dust is in the fan, but the most common case is when the psu is faulty or isn’t plugged in properly. Try unplugging it then plugging it back in or try replacing the psu. If it still doesn’t work replace the fans that has a high chance of working. If you tried all this and it still didn’t work contact Microsoft. I had the same problem myself. Hope This Helps!