If you got bootloop after flashed magisk, you need to flash stock rom boot.img.
If you got bootloop after flashed TWRP, you need to flash stock rom recovery.img.
If you got bootloop after flashed misc partition, you need to erase misc partition.
If you are using V12.0.5.0 or higher, TWRP will
not work.
Here, you can find boot images for original stock and magisk patched:
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4204671/
If you want to keep TWRP working on V12.0.5.0 or higher, you need to flash the stock rom
lk partition using V12.0.4.0 (or lower). (It will works perfectly with lower
lk partition version).
Here, are
LK images for flashing:
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4218925/
If you want to disable TWRP, you need to flash stock rom
recovery partition.
Here, are
RECOVERY images for flashing:
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4204671/
If your device keep booting in recovery (or blackscreen), you need to erase
misc partition.
Here, is the guide for erasing
MISC partition:
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4209299/
If you want to know what is working for MERLIN, take a look:
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4204873/
Good luck