Android Auto and Apple CarPlay work with your phone's built-in capabilities but the GPS and cellular antennas will work better if they are close to the windshield to minimize the Faraday Cage effect of the car's structure. You'll know that your phone isn't getting a good GPS signal when the map display starts spinning around unrelated to your travel. So, even if your car is equipped with Android Auto or Apple CarPlay, you should ideally be using a windshield mount for your phone.
Clamping Windshield Mounts
Magnetic Windshield Mounts