Chosen Solution
I can hear people taking but they can’t hear my voice unless I put it on speaker
Most likely either the bottom microphone hole is clogged and needs to be cleaned out or the charging port dock ribbon cable assembly needs to be replaced. That has the microphone together with it.
I agree with @benjamen50. The reason callers can hear you on speaker phone is because the microphone that is located on the front facing camera cable is active. This microphone is also active when you take videos. The charging dock holds the bottom microphone as well as the headphone jack and speaker connectors.