Check your iPhone's ringer switch to make sure it is not turned to silent mode to save time going through a number of troubleshooting processes. If you don't hear any sound from your iPhone's speaker for incoming calls or other audio operations, here is what you should do.
The ringer switch is positioned on the iPhone's top left side. Toggle that switch on and off to activate Silent mode. The sound is turned off and the switch is in the red position if it's set to silent mode. Just remember to change the ring.
If the switch looks to be stuck, try to remove the case to make sure that the switch is not blocked by anything.