You can implement it by using the approach described in
https://superuser.com/questions/1817039/disable-automatic-restarts-windows-11
You can disable automatic restart after installing updates in the Group Policy Editor.
- Open the Group Policy Editor (gpedit.msc).
- Go to Administrative Templates > Windows Components > Windows Update > Manage end user experience.
- Double-click on “No auto-restart with logged on users for scheduled automatic updates installations”.
- Select Enabled, and then select OK.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin