You are going to have to use the official mi unlock tool and make sure you are connected to the internet. Make sure you have created a miui account and that you are logged into both your phone and unlock tool. Also you need to get developer rights on your account, you only have to do it once with your account, did mine about 10 years ago, think I had to motivate why I needed it. Then once all the prerequisites are done you use the tool to unlock, you will most likely then get a cooling off period, varies from 3 days- 2 weeks, where you need to use the phone with your app signed in, think this is to prove to them that that particular phone is your phone. Then after your cooling period you just log ing to your boot loader, usually volume up and home button when restarting, and open the unlock app on your computer, unlock, then upload your own recovery like TWRP and now your phone is unlocked and ready for a custom ROM.
With the Redmi Note 3, I remember we used to bypass all these security methods by replacing the miui recovery with the TWRP recovery file in the MIUI uldate package, but thosee days are gone and they closed the loophole