You can try the following solutions:
1. Activate the small button at the top left of your iPhone, which cuts or resets the sound. Maybe it's just that, a fake move and your iPhone has gone silent.
2. Go to Settings> Sounds and turn off Silent mode if it is enabled.
3. Go to Settings> General>...