Quite a few people have run into an annoying issue where they can’t hear the other caller during a phone call. They can make and receive calls as normal, but they can’t hear the person on the line, or they sound muffled even when the volume is turned up.
Try using the Volume up button and make sure that the ringer volume appears on screen when you press it and not headphones. Make sure that nothing is covering the speaker. A screen protector, a case, or even dust can have a big impact. Use a brush or blow gently into the speaker to make sure it’s free of any blockages.
Make sure that you don’t have anything plugged into the headphone port. It can be worth plugging in headphones and taking them out again just to test if that helps.
Try turning Bluetooth off via Settings to make sure that you aren’t connected to a headset or car system. If you regularly use a Bluetooth device try connecting to it and then disconnecting to see if it makes a difference.
You could try going in to Settings > General > Accessibility and making sure that Phone Noise Cancelation is turned off, some people have found that this helped.
Try toggling speakerphone on during a call and see if the issue persists. If you’re still having the problem after trying all of these potential solutions then it’s time to talk to Apple and/or your carrier