I installed the new 12.2.2 rom on a MI 10. No problem at all. All worked fine.If you have a backup (which you should) restore system and boot partitions
If no backup, dirty flash current ROM
Or restore stock boot.img
EDIT: what device and ROM version?
Then I tried to flash Magisk and now in a bootloop.
flashedTWRP but after fastboot boot TWRP.img it says fastboot error Command failed.
And yes ofcourse I have a backup. How to install when I'm in a bootloop.