Hi arzavijji,
The recommended steps to help resolve your speaker issue are found quoted below from the article here: If you hear no sound or distorted sound from your iPhone, iPad, or iPod touch speaker
"If you can't hear a person's voice clearly, hear crackling, hear static, or have issues with sound quality, learn what to do.
Follow these steps
- If your device has a Ring/Silent switch, move the switch forwardâtoward the device's displayâso that orange isn't showing. If you're using an iPad, you can also swipe down from the top-right corner to open Control Center and make sure that Silent Mode is off.
- Open Settings > Focus > Do Not Disturb and make sure that Do Not Disturb is off."
There are additional steps you can complete the in article to test. If the issue continues, and as you've already had service completed it's recommended you have the hardware checked by an Apple Store or Apple Authorized Service Provider. You could also return to the technician that replaced the speaker and inform them the issue continues.
If needed, you can view information for service in the link here: iPhone Repair
If you need further assistance with your options, reach out to Apple Support directly.
Contact - Official Apple Support
Contact Apple for support and service - Apple Support
Best.