The key is that the process running the installation needs administrator rights. If you log on as an administrator and configure Windows Update to download and install updates on a regular schedule, ...
If you don't want to deal with all the annoyances of Windows 11, the Group Policy Editor can go a long way. Here are a few ...