......except for the fact there is a small crackling sound when the volume is at its max
Do you normally listen to the volume at max? If not, is the sound distorted at normal listening levels?
Is it water damage or is it dust/dirt/rusting of internal parts causing the audio to scratch?
Connect a pair of earbuds to the iPhone using either a wired or wireless connection.
Is the audio distorted when you check this way? If yes, the electronics inside the phone have been damaged by water.
Does the audio sound OK when you check this way? If yes, then you know that the electronics inside the phone are likely OK.....at least for now......but the iPhone speaker itself was damaged by water.
Unfortunately, Apple will not repair a phone that has been damaged by water. So, depending on your checks and tests, you will need to decide whether to start shopping for a new phone.
Water may also cause delayed problems.....overheating, screen issues, etc. No way to know in advance whether problems might occur at a later time.
For example, my wife dropped her phone into the swimming pool by accident. The phone was retrieved quickly and seemed to be OK after a day of drying. But, after 3-4 days, the phone began to overheat, causing it to shut down.