How to do if the phone cannot be connected to car using Android Auto?

Solution:

We need to enable USB debugging following these steps :

Settings -> About Phone -> Click 7 times on MIUI Version until receiving a message that you became developper option

Go back to Settings -> Additional Settings -> Developper option and enable USB Debugging, and then try to connect the phone to car again