First of all, what model is your car, and how old is it? Is the head unit Android Auto capable?
I would suggest going into the Bluetooth settings on your phone, and 'forget' the current connection. Once you've done that, switch off the phone, with Bluetooth also switched off beforehand. Next, go into the head unit, and delete your phone's profile.
Now, switch your phone on, and enable Bluetooth. Let it search for new connections. At the same time, get your head unit to search for your phone. All being well, they will find each other. Pair them to each other by confirming that the displayed 6-digit code is the same on each. Again, all being well, you are now paired.
By selecting the correct mode on your head unit, you should be able connect wirelessly via Bluetooth.
If, however, you are looking to enable hands-free connection to your car, via Android Auto, its most likely that you will need to connect by cable, to allow you to use the following features of your phone on the screen of your head unit:
MAPS (Google Maps, Waze, etc)
MEDIA (voice dictation of messages via WhatsApp, etc)
AUDIO (Samsung Music, Spotify, etc).
It seems that wireless Android Auto is only now being fitted to vehicles, although some high-end models from about 2019/2020 have this feature, hence you will need a cable - either the original Samsung cable, or I use Juice cable, which you can buy in Asda for about £10-15.