Xbox Randomly turning off

So I bought a used Xbox one s for about $40 and it was stated to turn off randomly, and I thought it would be an easy fix. It's a random time, it can be immediately or it'll wait for 10 or so minutes before shutting off.

So now I think it might be the power supply unit or HDD as it keeps turning off and giving me the E200 errors.

What do you guys think?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0