Updating MIUI on a rooted Xiaomi K20 Pro (Mi 9T Pro)
I have a Chinese Xiaomi K20 Pro as my phone. Unfortunately to install an EU ROM, the device must be unlocked, which means some apps complain due to Safetynet and other "integrity" checks. So I use Magisk and the Magiskhide module, and everything works great... until it's time for a system update. I'm assuming you are familiar with TWRP etc... this is mostly just a guide for myself so I don't forget how to do this next time an update comes along :).
How To Update
Download the new ROM version as a recovery zip from https://xiaomifirmwareupdater.com/miui/ and copy it to your phone. Reboot to recovery and install this zip, no need to wipe data or you will lose all your apps and settings. Once the system has booted, you will no longer be rooted. Extract the boot.img from the recovery .zip and copy it to your phone. Use Magisk Manager to Install and patch this boot.img, making sure Magisk is up to date (try Canary) as Xiaomi continue to add anti-root features to their ROMs! Copy the magisk_patched.img back to your PC and fastboot flash boot magisk_patched.img.