Hi,
I had a look around and a few places including eBay sell second hand earpiece parts for your Motorola Moto G7 Power. But since there is no detailled guide on how to replace this/take the phone apart you’ll have to rely on youtube videos of tear-downs if they exist. The parts seem to sell in the 10-15€ range, so it seems like an inexpensive repair if this would be the only thing wrong with your device.
Good luck with the repair if you do make an attempt!