You can also take the file, "appraiserres.dll" from the sources folder of a Windows 10 ISO and inject it into the sources folder of an Windows 11 ISO. This does the exact same thing as everyone wasting time writing a script for and it comes right from Microsoft.
The latest version of Rufus will do the job fine in bypassing TPM checks, also it has some more other options