There are many reasons why Android Auto may stop connecting, and the initial fixes typically focus on the phone and connection. You inspect the cable, restart the device, forget the car, reconnect it and make sure Android Auto is up to date. If all that fails, however, the software that requires attention might be in the dashboard.
Your car's infotainment system also has software, and if it's out of date, it can cause Android Auto connection problems. Google advises users to restart the infotainment system and, if the receiver is an aftermarket Pioneer or Kenwood unit, to visit the manufacturer's website and check for a firmware update.
Android Auto relies on the phone and car working correctly, and if you just focus on the phone, you may be missing half the equation. If none of the above has worked, including changing cables, reconnecting the phone or restarting the phone, then the car's software is another area to consider.