[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] q695359:
I'm a noob but here's my instruction of what I did (to other users, do give your insight if you have a better instruction),

"Firstly unlock your bootloader" -

1) go search for "mi flash". Then create a mi account and ready a phone number for sms verification. Follow the mi flash website instruction and wait for a few days (it says at most 10 days to activite mi flash account). Doing some activities on your mi account will reduce the waiting days.

2) Next go to your phone and enable developer tools (tapping the build version 5x times in setting/about phone). After that, go to developer option and turn on enable oem unlocking and login with your mi account. Here you will have to wait for three days (it says 72 hours) until mi flash tool let's you unlock.

3) Find and get the miflash_unlock zip or MiFlashSetup file. After your mi account oem flashing is enabled, you've login to the mi flash tool and you have login to your device for 3 days, you can finally unlock the bootloader.

link1: xiaomiadvices.com/unlock-bootloader-redmi-4-4a-4x/

"And flash miui 9 ROM with fastboot" -

1) Either search around for the term miui 9 firmware or if you are planning to flash to the unofficial lineageOS, you can just download "Firmware", "Lineage 14.1" and Arm64 Pico Gapps from first post.

2) If you want the device to have a root manager, search for "Magisk" and get the Magisk zip and Magiskmanager apk.

"After that flash TWRP recovery image" -

1) Search around for twrp or "twrp santoni" and download it.

3) If you have not flash android before, you'll need more tools, including "adb fastboot" zip,"adb driver" and sometimes more drivers (this is a pot of worm as there are multiple drivers online. some works, others don't.).

4) Backup your device if you haven't because all data will be wiped before you can install the custom rom. Otherwise, there will be problems when loading/ using the custom rom.

5) Put all your rom files including the firmware, the custom rom and root manager on to the phone (I recommend putting them into the internal sd card in case wiping the current rom delete all of them)

6) Turn off your device and press volume down + power button to get your device to fastboot mode.

7) Now extracted the adb fastboot zip and open it up in cmd (open cmd in admin, cd to your adb fastboot folder and type 'fastboot devices'). If you see your device listed in the cmd, you are ready to flash your device.

8) Now you can flash your recovery to TWRP recovery. Type 'fastboot flash recovery xxx.img' where xxx.img is the twrp img file, and then type 'fastboot reboot'. If you don't see your device reboot to TWRP, you can try typing 'fastboot boot xxx.img' to quick load twrp recovery.

9) Now from the twrp options (after clicking cancel for password if you see any). If your rom files are on the sd card, you can then click wipe/format data and type in yes to proceed. Just in case, I also clicked on advanced wipe and select all except sd card and otg.

10) Now your device should have no OS on it. Go to back to the first option for 'Install' and select your sd card. Install these in order of "Firmware", "Lineage 14.1","Magisk" and then Arm64 Pico Gapps if you need.

11) After it is done, click clear cache and reboot (I clicked no for installing twrp)

12) Wait for a dozen minutes and your custom rom should be ready except for the Magisk manager which you should install it now.

13) Now you finally have the custom rom on your device!

link2: xiaomiadvices.com/download-redmi-44a-usb-drivers-pc-suite-mi-flash-tool-twrp-recovery/

edit: I forgot you need to find a 'key fix" zip to fix the left bottom key function and flash that too.