If your device is not recognized by your computer under Ports (COM & LPT) or As Android Bootloader Interface under Android Phones in Device Manager, make sure to install all necessary drivers like ADB, and Qualcomm QDLoader, and Xiaomi USB Drivers. Also, make sure the USB cable is properly working.