If the issue persists, it may be hardware-related. In that case, you'll need to visit an authorized service center to have a technician inspect and repair your phone's speaker.
In MacBook Pro models before Apple silicon, the whole top case of the MacBook Pro had to be replaced if a speaker needed repair. That meant that a customer had to pay for replacing parts that didn’t ...