Here is a basic and important info how to resolve this issue.
What is fastboot mode?
What is Recovery mode?
Recovery Mode is used for Zip files from OEMs or Update the OS version or firmware version. You can also use for deleting Userdata or do a factory Reset of your phone.
Recovery does not use command line tool instead it itself can flash the files which can be kept in the phone memory (if phones memory has partition available) or file can be kept in external SD card.
Recovery Mode on Xiaomi phones :
While you struggle to find out what and where exactly the problem is, your battery might get drained out and then you are out of options now. With drained battery, you can neither check further nor you can reflash new OS.
After digging a lot, I found a way to charge the battery atleast. So that I could confirm that, problem is because of Power Button and not because of corrupted OS.
While trying to do all of this , I tried flashing a complete OS image using the Xiaomi flash and that deleted everything from my phone including OS, so phone was just rebooting in fastboot mode.
To start with, I am assuming you have fastboot.exe on your system. If not, please refer this: https://wiki.lineageos.org/adb_fastboot_guide
And quickly need to flash the TWRP Recovery Image.
In my case - I renamed the file to recoveryb.img
fastboot flash recovery <path to recoveryb.img/recoveryb.img
The file size is around 14MB so it would be flashed quickly before your phone switches off or reboot.
Even if your battery is dead you can flash via fastboot.
You can search for Fastboot flash recovery image on XDA forum. Please do drop a comment if you are not able to fine the fastboot.zip file, I can find and share with you.
Alternately, you can double click and run the flash_recovery.bat file to flash the TWRP recovery image when phone is in Fastboot mode.
Once flashing is done, you will start seeing the MIUI logo.
Now, Connect your phone to a charger and you can remove the battery and connect it back while holding Power key and volume up key.
This will take you to TWRP recovery screen (as device was flashed with TWRP recovery image)
Quickly at bottom of the screen press up or down to move to some other page in recovery screen.
It seems, for me Power button had no impact on Recovery screen and I was able to charge the phone to 100% in recovery mode.
You would notice that phone is charging at the top right , where battery percentage is append with "+" symbol
Let the phone charge completely to be on the safer side.
Meanwhile, you can download the complete OS for your phone from MIUI.com
and keep it in SDCARD
Once phone is completely charged or charge is greater than 80%. Keep the sdcard inside the phone.
Press the Power key and volume up key to go to TWRP recovery screen.
Click on Install button.
Select the SDCARD path where OS zip image is kept (remember flashing the complete image will make you loose your all data)
And select Yes to start the phone flashing.
Now your phone has a proper OS image which is supposed to boot properly.
But if phone continues to boot again and again from MIUI logo screen.
That confirms something is wrong with the power button of the device.
Go to nearest mobile repair shop and get the power button replaced.
He might argue that the issue is with OS or flashing but as you have done your homework, ask him to replace the button blindly. It just would cost you few bucks. There you go, you will have your phone working afterwards for sure.