go to run then enter regedit
Navigate to
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Double Click on the “PowerDownAfterShutdown” entry in the right pane and type “1” in the “Value” option.
Reboot and problem should be solved. If the entry PowerDownAfterShutdown does not exist you can create it but ensure you have a backup of your registry just in case you have done something wrong, you would be able to restore it.
alternatively you can try other methods in this guide I found online https://appuals.com/windows-10-restarts-instead-of-shutting-down/