You can't do that, otherwise you'll brick your phone.
Attention!
You can only lock the bootloader in the following cases:
- CN devices with CN ROM
- Global devices with any Global ROM derivative (MI, EEA, RU, TU, TW, ID, IN, etc.)
TWRP is not required.
xiaomi.eu is a hybrid ROM, it can be installed via fastboot or TWRP.
See the first post of this thread or this tutorial: https://xiaomi.eu/community/threads/how-to-install-xiaomi-eu-rom-for-devices-a-b.62738/post-624043
I would like to point out that the situation with GPay and some applications requiring greater security is currently problematic.
https://xiaomi.eu/community/threads/regarding-google-play-integrity-google-pay-wallet.75761/post-748452
If you are not Chinese with a Chinese ID and a Chinese Xiaomi account, this is not possible.
If we are talking about the Chinese version of the device.
"For Global devices, the bootloader can be unlocked"
It doesn't matter, because if you are switching from an official ROM to a xiaomi.eu custom ROM, a clean installation is required.
- You can directly install xiaomi.eu ROM https://xiaomi.eu/community/threads/how-to-install-xiaomi-eu-rom-for-devices-a-b.62738/post-624043
- After installation You...
5s using Google search.
to download click on the green "code" field
https://github.com/CoderTyn/Magisk-Alpha
https://www.magiskmodule.com/download-magisk-alpha/
https://t.me/s/magiskalpha?q=app-release&before=659