Hello,
Press Win+S to open search bar, type advanced windows update options and open the setting:
Under the Update options section, turn off the Restart this device as soon as possible when a restart is required to install an update toggle switch.
If it is domain environment, please check these applied domain policies.