Chosen Solution

My xbox one shuts off within seconds of me turning it on. Any suggestions

Are any indicator lights or beeps being emitted when it attempts to start?

While not experienced with game consoles, going off experience with PCs and that its an older Xbox One, I would look at a potential heating issue. Is your Xbox dusty at all externally? If so, it it likely much so internally.

Xbox One Teardown

Without one who is more experienced with consoles specifically, I would personally begin by dusting the exterior and then carefully dusting the interior of the device as well, especially about the CPU fan.

Goodluck,