This TWRP works with Xiaomi 12
forum.xda-developers.com
Command to install:
1. boot your device in Fastboot mode
2. fastboot boot recovery_finename.img
This will temporary boot your device to TWRP
3. From TWRP go to Advanced and choose "Flash curent TWRP" - this will permanently install TWRP but will overwrite magisk scripts, so root will be lost.
4. Flash magisk from TWRP - this will fix root.

📌 [Shared] TWRP by skkk
⚡⚡A12/A13⚡⚡ ----------------------- BOOT VERSION Installation: Phone in fastboot mode Cmd: fastboot boot twrp.img Power shell ./fastboot boot twrp.img then in Twrp go to Advanced -> flash current TWRP...

Command to install:
1. boot your device in Fastboot mode
2. fastboot boot recovery_finename.img
This will temporary boot your device to TWRP
3. From TWRP go to Advanced and choose "Flash curent TWRP" - this will permanently install TWRP but will overwrite magisk scripts, so root will be lost.
4. Flash magisk from TWRP - this will fix root.