Recovering Notes from Water Damaged iPhone
Have a technician (not an apple one) carefully open up the iPhone (hopefully you dont have a warranty). Remove the SIM card and battery. Then lay the halves flat and then use a vacuum cleaner with a long nozzle to dry out the moisture. Make sure its on low and that its not close to the phone. If too close it will short circuit the phone, making the motherboard useless. Make sure that there is no heat.

I've heard silica gel works also if you find an iPhone water damage professional, they can fix the issue. Just make sure they offer you a warranty.

https://www.wikihow.com/Save-a-Wet-Cell-Phone