Prevent Windows restart after updates
Windows \ Run \ gpedit.msc \ Local Computer Policy \ Administrative Templates \ Windows Components \ Windows Update
You should enable
No auto-restart with logged on users for scheduled automatic updates installations and optionally enable
Re-prompt for restart with scheduled installations with maximum value
For policies to take effect you may run
To check is policy applied you may run
If restart prompt still opens you should restart Windows Update service or restart your machine.