Wa Alaikum Salam. Brother try checking following links:
www.ryadel.com/en/windows-auto-reboot-shutdown-scheduled-task-scheduler-cron
www.ryadel.com/en/windows-10-disable-automatic-shutdown-windows-update
Try installing some reputed antivirus software, and scan the system. May be, the system is infected with some malware causing all this. However if some malware is there and its powerful, then it might be possible that it does not let antivirus run. In that case, I fear that you will have to back up your data and completely format the hard disk, especially C Drive, where Windows is installed.
I hope, all above helps, and just by following steps in the above two links, your issue gets resolved. Thank you.