Just an FYI, if you are bricked doing the upgrade to 12.7.1 or 13.6.1, the process to recover without losing data is very detailed. (Note: I have not performed this myself, but I have confirmed with out MacAdmins dealing with it)
1) Put the affected computer in to DFU mode.
2) Revive the computer using Apple Configurator and an IPSW for macOS Sonoma. To choose a specific IPSW, drag the IPSW to the DFU icon in Apple Configurator. Do NOT try and use an IPSW earlier than the version you tried to upgrade to.
3) Once the revive is complete the computer will reboot to boot menu. Do NOT select Macintosh HD, instead select Options to boot to recovery
4) Select the option to reinstall macOS Sonoma on your computer. Don't erase the drive first. Reinstall will not wipe user data.
This should work, however, you will be upgraded to macOS Sonoma.
It would be much easier if Apple would release IPSWs for 13.6.1 & 12.7.1. But they don't typically release new IPSWs for older OS.