If your phone sounds muffled after contact with water, the speaker is not automatically broken. Very often, there is only moisture in or around the speaker opening.
Dry the device carefully, hold the speaker facing down and do not use heat. Do not push anything into the openings, and do not charge the phone if the port may still be wet.
If the speaker still works but sounds muffled, you can try a speaker cleaning sound. If the sound becomes clearer afterwards, the problem was probably moisture around the speaker area.
If the sound stays bad or the phone shows other problems, it is safer to have the device checked.
→ Clean your phone speaker online