I am not sure. Anyway to check?it was restarting randomly and I tried to reset it from settings then it got stuck at the booting up screen.
Kinda hard to give specific advise what exactly is happening without more details.
Are you able to try starting in safe mode and there should be an option to select windows to boot in the last known good configuration? Since its a -prebuilt pc sometimes can just try setting everything back to default factory settings and see if able to work.
Regarding the random reboots...
Not sure if you can recall what was the last thing you did before the random restarts happens?
Maybe did you try some overclocking functionality? Or adjusted heatsink after cleaning dust from the insides of the computer? Attempting to change with voltage adjustments etc?
If in windows mode, random restarts didnt happen, but only happens when gaming, could be something to do with GPU/Power supply related.
Overall now seems to be a bad timing to purchase any new PCs for gaming as GPUs are in short supply or even no supply. (Unless you willing to pay crazy price for it)