what should i do?
Test if your hardware is working correctly.
Check for overheating issue, broken components, etc.
Check if this particular OS is installed and working correctly.
Check for driver issues. Standard PC maintenance tasks.
The windows 98 days are long gone, where a user's software could restart the computer.