Check the iPhone ringerandvolume.
On the side of every iPhone are three buttons: the ringer/mute switch and two volume buttons.
To get your iPhone speakers working again, toggle the ringer switch.

Apple Inc.
Also, raise the volume on the phone as high as it will go.
Check the sound options.
Go toSettings>Sounds & Hapticsand check the options there.
see if the iPhone is stuck in headphone mode.
The iPhone can only send audio output to one place at a time.
Your iPhone speakers could be working fine but may be stuck in headphone mode.
The iPhone speaker can’t play sounds if the audio is sent from the iPhone to another gadget.
To turn off Bluetooth, selectSettings>Bluetooth, then move theBluetoothtoggle switch tooff/white.
Check the audio output options.
Your iPhone might be connected to an external speaker via AirPlay without you knowing.
SelectiPhoneif it is not already selected.
It’s possible that your iPhone speaker is busted because of a temporary software glitch.
If that’s the case, restarting it may clear out that glitch.
Update the operating system.
Updating the operating system can solve software problems.
Software updates also fix bugs that may appear from time to time.
Plus, since updates are free and quick to install, it’s worth a try.
Get support from Apple.
It’s likely that the phone has a hardware problem and will need a repair to fix it.
Take your iPhone to the nearest Apple Store or get support over the phone.
If you take it to an Apple Store,make an appointmentto get help right away.
That’s because many things can potentially cause an iPhone’s speaker to remain silent.
First, try closing the Phone app, then reopening it.
If the problem persists, shut down and start your iPhone and check for iOS updates.
If those fixes don’t work,reset your web connection configs.