Is this a new problem or has it been continual?
I noted that you have 8 GB of RAM.
AE's specs indicate a minimum of 16 GB with 32 GB recommended.
Reference:
https://helpx.adobe.com/after-effects/system-requirements.html
Take a closer look at your PC's specs versus Adobe's recommendations.
Other thoughts:
What PSU is installed in your PC? Make, model, wattage, age, condition?
Reinstall Adobe: the current installation may be out-of-date, buggy, or corrupt. Where did you get AE?
Look in Reliability History. There may be error codes or warnings that correspond with the times of the restarts.
Use Resource Monitor and Task Manager to observe system performance before rendering and then (as much as possible) watch when rendering. Maybe some less demanding project at first then increase accordingly.
May be some threshold value that once reached/hit forces a restart.