Try this powershell code:
If (((get-date).DayOfWeek) -eq "Tuesday") { Restart-computer -Force}
You can also create a task scheduler to run the reboot command on every Tuesday. That would be very easy.
There are many PowerShell functions available on Github and in Copilot, that calculate patch tuesday. I use that function in many scripts to execute certain tasks only X days after Patch tuesday, like reboot schedules.