Hi, Haley!
Thanks for visiting the Apple Support Communities. We see that you are experiencing a problem listening to music from your iPhone while in your car, though it will still charge. We're happy to help!
Based on what you've described, we recommend following the steps under the "Connect using USB playback" section of How to connect your iPhone, iPad, or iPod touch to your car - Apple Support, which you can find below:
"Connect using USB playback
- Restart your device and your car.
- Make sure that your device is unlocked and on the Home screen.
- If possible, try to connect using another cable or USB port. Check the manual that came with your car to learn how to connect an Apple device.
- Check your charging port for any debris or damage. Make sure that your charging cable is properly inserted into the port.
- Update your device.
- Make sure that your stereo is using the latest firmware from the car manufacturer. Check your car's manual for more information.
- Try playing audio from a different app. If you can't play audio from a third-party app, contact the app developer for help. If you can't play audio from an Apple app, contact Apple Support."
Best!