Have a look at the steps mentioned in this related article:
...
Choose one of the options below to have your iPhone 12 or iPhone 12 Pro serviced. Your iPhone will be examined prior to any service to verify that it is eligible for this program.
Before service, back up your iPhone to iCloud or your computer. Learn more about preparing your iPhone for service.
If your iPhone 12 or iPhone 12 Pro has any damage which impairs the ability to complete the repair, such as a cracked screen, that issue will need to be resolved prior to the service. In some cases, there may be a cost associated with the additional repair.
Additional Information
Apple may restrict or limit repair to the original country or region of purchase.
This worldwide Apple program doesn't extend the standard warranty coverage of the iPhone 12 or iPhone 12 Pro.
The program covers affected iPhone 12 or iPhone 12 Pro devices for 3 years after the first retail sale of the unit.
...
copied from: iPhone 12 and iPhone 12 Pro Service Program for No Sound Issues - Apple Support