From the ‘Choose how updates are installed’ drop-down, select the ‘Notify to schedule restart’ option. In the Windows Update tab, click the ‘Advanced options’ link. Open the Settings app and go to the Update & Security group of settings.
If this is something that happens to you too often, you can have Windows 10 notify you when it’s ready to install updates so that it’s opt-in installation instead of automatic and forced. After sitting through the mind numbing long period that Windows takes to install updates before it actually shuts down, you have to wait for it to finish installing them when you boot your system again. You shut-down or restarted your system and it began installing updates.