The problem might be due to software or hardware issue. Approach customer support to solve hardware-related issues.
Clean the Speakers
The first thing you need to do is clean the speakers, dust or lint present on the screen may affect your ringer volume. Take a brush and remove the dust.
Change the ringer Volume
Check the ringer volume, go to the sounds section in the settings and increase the ringer volume to adjust the sound.
Turn off Do Not Disturb Mode
You might have enabled the silent mode or do not disturb mode, make sure to turn them off to get the phone to ring.
Turn Off Airplane Mode
If Airplane mode is ON on your phone, it won't let you receive any calls. Swipe down to bring the control center and turn off the icon with the airplane symbol on it.
Turn off Bluetooth
When your phone is paired with another device like headphones, the phone won't ring, so try turning off the Bluetooth and check by playing any media.
Remove third-party Ringtones
Third-party ringtones could bring unwanted external malware into your phone, so if you have any remove them and use a default ringtone.
Restart the Phone
If none of the above works, try restarting the phone, this will rectify the internal glitches in the phone and gives the OS a fresh start.