Say you dual boot Windows and Linux, and use the simple and light-weight systemd-boot to switch OS. Say you boot to Linux by default. However, this causes headaches when Windows updates and needs to restart as part of the process, especially if it has to do so multiple times (for example major feature updates).
You could change the default right before you boot
Automatically set Windows as next boot when restarting as part of an Update
Create a script
%windir%\System32\update\run\precommit.cmd with the following contents: