Shutdown: In versions of Windows prior to Windows 8, Restart and Shut Down did the same thing; closing down programs and powering off the machine. 
But this is changed since Windows 8, with the new feature named "Fast Startup".

"Fast Startup" is a feature designed to make your computer boot up faster after a shutdown by saving the "system state" to a hibernation file. When you select "Shutdown" in Windows 10 or Windows 11, it actually performs a hybrid shutdown, where the kernel session is hibernated to disk, allowing for quicker startup times when you power on your computer again. This feature is enabled by default in both operating systems because it enhances the user experience by reducing boot times.

Restart: it will shut down all of the computer's processes, including the kernel and as a result, users could get a totally clean start when the computer boots up again, though it takes longer to get everything running.

Restart should be used when installing updates/software and to resolve any errors. If the computer has frozen or is giving off some other error, you should use Restart rather than Shut Down, even though it may seem to you that Shut Down would be a more complete option.