Check out this article to fix the issue and restore your earpiece functionality. I wrote a guide to that for the iphone x, but the procedure is virtually identical for the 12 Struggling with a phone that only works on speaker
How to Fix iPhone Speakers Not Working?
Learn how to troubleshoot and fix this frustrating issue with our comprehensive guide.
Another possible cause of the problem could be dirt or obstructions on the speaker or issues with the phone case affecting the sound
If it is a hardware issue like a malfunctioning speaker, you may need professional repair or replacement to ensure that your phone’s audio works properly during regular calls. Nevertheless, akin to any device, iphones are susceptible to encountering software and hardware issues, such as battery life, screen responsiveness, and connectivity problems The earpiece of the iphone holds significant importance as it directly. The speaker itself is only connected to the flex cable assembly by two solder points, so it is entirely possible to replace just the speaker itself, keeping the rest of the assembly and thereby retaining face id