So if you want a Xiaomi and care about security, simply remove the bootloader lock and install LineageOS. Some models are officially supported by LineageOS.
LineageOS provides timely Android security updates, but only the manufacturer can provide vendor security patches even when a custom OS is installed. If Xiaomi did this monthly, its phones would be as hacker-friendly as Google's Pixel phones.
Xiaomi's update schedule isn't terrible, but it's disappointing that even its flagship devices only get quarterly updates, while other brands including Samsung, Oppo, OnePlus, and Realme commit to monthly or at least bi-monthly updates for their flagships.
https://www.nextpit.com/how-many-android-updates-manufacture...
Not everyone is willing or able to flash another OS onto their phones, and considering its success, Xiaomi can afford to do better to protect its users with more timely updates.
https://www.mi.com/global/service/support/security-update-1....
The only exception is Xiaomi's Android One "A" line, which is now discontinued.