Before going through the entire guide, just make sure that your iPhone is actually stuck in headphone mode.
How Do I Make Sure My iPhone Is Stuck In Headphone Mode?
- Unlock your iPhone using its passcode.
- Press either volume button on the side of your iPhone.
- If it says “Headphones” above the bell icon, your iPhone is in headphones mode.
- If the volume buttons aren't adjusting the volume, go to Settings -> Sounds & Haptics and turn on the switch next to Change with Buttons.