There are 3 microphones in the iPhone.
- The bottom microphone is for Voice Memo and phone calls. The other microphones serve as error cancellation
- The (top) front microphone is used for FaceTime calls, Siri and selfie videos with the front camera (FCAM). The top back microphone serves as error cancellation
- The (top) back microphone is used for videos with the rear camera (RCAM). The top front microphone serves as error cancellation
Make sure you update your device to the latest version of iOS and then try to isolate which microphone is not working properly by trying each individual microphone with the related apps above. If the issue affects more than one microphone, then it could be the Audio Codec IC on the logic board.
As a last test, use the microphone in the Apple Earbuds.
Anything at the logic board level will require micro-soldering so you would need to find a repair shop that offers those services.