Hey,
I've had some problems too earlier, and I decided to try again this week-end and now it's been working wonderfully. I've followed those steps from stock MIUI 12.5:
- Download PPUI ROM
- Download NEBRASSY TWRP (My previous attempt was with VASI's)
- Download MiFlash for drivers
- Boot phone into fastboot
- Run fastboot boot twrp.img (or any name of the nebrassy's twrp downloaded file)
- Install ROM through TWRP and then just reboot into recovery
- You should land onto the PPUI recovery, choose to wipe data (factory reset) then reboot and install your phone
- After that, I've decided to permanently flash TWRP Recovery (as I didn't do it before, but I think it's possible before) so re-do the step to boot into twrp recovery
- Copy img to your sdcard with: adb push twrp.img /sdcard
- Go to advanced and choose Install recovery from ramdisk (important: if it fails as it did to me, you just need to swap partition A or B) and then reboot, all done!
Note: If you've swapped partition, you might need to swap again to properly boot to your OS