Chosen Solution

I recently did a battery replacement and all of a sudden my phones earpiece stopped working. I switched the earpiece from a working phone and it still doesn’t work

Check the cable coming from the front camera, is there any visible tears on the cable? Try pressing the volume up and down button. Does it say headphones or ringer when adjusting it and do you also see the volume bar at the bottom of the volume adjustment popup too?