The problem is you're asking for
any W10/11 computer, and you can't have an universal boot media if Secure Boot is enabled.
Four valid possibilities exist for Secure Boot certs:
1. Secure Boot is disabled. It doesn't matter what you use, any CA 2011 or CA 2023 boot file works.
2. Secure Boot is enabled, but only CA 2011 exists. The PC doesn't have CA 2023 installed, because there is
no BIOS update or Windows automatic update available for this unsupported PC. It might be updated by manual intervention, but the user doesn't know how. So it's trapped on CA 2011.
The boot manager must be CA 2011, since Secure Boot only recognizes CA 2011. This is the "unsupported PC".
3. Secure Boot is enabled, both CA 2011 and CA 2023 are installed. CA 2011 has not been revoked yet. Either version of the boot manager works, because both sets of certs are currently trusted. This is where half of the Windows users are today, both sets of certs but revocation has not happened yet.
Eventually MS will force a mandatory revocation, but until then any boot media works.
4. Secure Boot is enabled, both CA 2011 and CA 2023 are installed, but CA 2011 is revoked. Only CA 2023 boot manager that has a higher SVN can be used for the boot media.
In cases 1 & 3, any version of the boot file works.
In case 2, only CA 2011 works.
In case 4, only CA 2023 works.
UEFI only checks that the signing cert of the boot file (bootmgfw.efi or bootx64.efi, if the first filename is missing) is eligible based on the current combination of PK/KEK/DB/DBX certs. That's it, UEFI only cares about the signing cert. It doesn't care about version numbers, sizes, etc.
When the Windows boot manager runs, it will check if SVN is enforced by a DBX SVN entry. The boot manager knows its own SVN number, and compares its value against the DBX SVN. If the DBX SVN is higher than boot manager's version, boot manager voluntarily stops running and throws a security violation error. SVN enforcement is handled by the boot manager, and not by UEFI.
A boot file can only be signed by one cert (not technically true, but for our discussion we'll assume that for simplicity). This signing cert can be CA 2011, CA 2023, or even a 3rd-party cert someone has created (like for Linux).
\Windows\Boot\EFI -> boot files signed by CA 2011
\Windows\Boot\EFI_EX -> boot files signed by CA 2011
The two parallel sets of boot files are identical programs, except for their signing certs. Whether you use the
Make2023BootableMedia.ps1, my script, someone else's script or manual copying, doesn't really matter if you follow the rules.
If you have a WinPE based media, you need to copy
EFI\bootmgfw.efi (2011) or
EFI_EX\bootmgfw_EX.efi (2023) ->
\EFI\Boot\bootx64.efi
If you have a WinRE based media, you need to copy the same file to
\EFI\Microsoft\Boot\bootmgfw.efi. In reality,
you shouldn't just copy a few files. There are more files that matter for WinRE, but it's safer to use the bcdboot command, since it was created for this role.
Here's my script which performs a check of the current system, and decides whether to replace the boot files on the USB media.