First, you have to reboot the device in Fastboot mode. However, if you want to install a stock ROM to update your device or do an installation from scratch, and your device isn't rooted, doing so through Xiaomi Flash Tool is the most convenient.
To flash custom ROMs, it's best to use a modified recovery and do it from the smartphone or tablet itself. With it, you can install an official ROM on your devices to update them or fix any problems you've encountered. Xiaomi Flash Tool is the official Xiaomi tool for flashing and installing ROMs on Mi, POCO, and Redmi devices.