How to stop automatic restart when Windows perform updates

Sometimes, certain Windows updates restart your computer without any warning. However, if we are not in front of our screen at that moment, there is a risk of losing all the files that we might not have saved at that time.
To prevent our computer from restarting, you can perform the following steps:
Go to Control Panel -> System and Security ->Windows Update. PressChange settings and then at Important updateschoose Download updates but let me choose whether to install them and press ΟΚ.