Hi Johnnyboy2901,
Check out and complete the steps in the article here: If your headphones don't work with your iPhone, iPad, or iPod touch - Apple Support
Specifically, the section that states:
"Check for debris, damage, or loose connections
- Check for debris in the headphone port on your iPhone, iPad or iPod touch.
- Check your headphone cable, connector, remote, and earbuds for damage, like wear or breakage.
- Look for debris on the meshes in each earbud. To remove debris, gently brush all openings with a small, soft-bristled brush that's clean and dry.
- Firmly plug your headphones back in. If your iOS device has a case, remove the case to get a firm connection. "
If the issue remains, continue with the additional steps in the article. Reach out to Apple Support directly if there's no resolution from said remaining steps.
Contact - Official Apple Support
Contact Apple for support and service - Apple Support
Best.