Hi @pbplus313058 ,
Try using the earphones with the microphone attachment and listen if you can hear OK when using them on a call.
If you can and since you can hear OK when using the loudspeaker then most likely there is a problem with the phone's receiver. It's either faulty or has come loose from the systemboard
Here is a [https://www.youtube.com/watch?v=azQ9tssCllM|link] that shows how to replace the receiver in your phone.
Here is a link to some [https://www.ebay.com/b/Ear-Speakers-for-Motorola-Moto-G/43304/bn_71551465|suppliers] of the replacement part. It is not a recommendation to use them. It is shown to give an idea of the cost of the part.
If the repair process seems to daunting, I suggest that you contact a reputable, professional mobile phone repair service and ask for a quote to repair the phone.