When the phone falls into water by any chance water enters into the phone we put it in rice. This is the best hack followed by many people since more than a decade. Apple warns users to not put their iPhones in rice which can cause damage to internal parts.
Don’t put Your iPhone in Rice if you see liquid detected
“Don’t put your iPhone in a bag of rice. Doing so could allow small particles of rice to damage your iPhone,
Although you shouldn’t charge your iPhone when it’s wet, you might need to in an emergency. If you reconnect your iPhone to the cable or accessory, you have the option in an emergency to override the liquid detection and charge your iPhone.” Apple Suggested.
If you see a liquid detected warning on your iPhone don’t charge it. Leave it in a place with good airflow and give it some time to dry.