Please check the mute switch. To un-mute your system and app sounds, just check the mute switch above the volume rocker. Sliding it all the way up, so that the little red dot is not being shown.
Connect your earphones and turn the volume up/down to see if there is any sound.
iOS might have the following problem(source: Google): 'Toggle button was set to screen lock, not mute, in settings. However, I changed the setting to mute, and then back again to screen lock. That fixed the problem. Clearly, this is a bug that needs fixing.'