Putting a wet phone in rice is popular advice, but it doesn't really help.
1. Rice only dries the outside. Water trapped under shields and chips stays there.
2. While you wait, corrosion starts on the board, especially with the battery connected.
3. Rice dust and starch can get into ports and the speaker.
4. Phone makers themselves advise against using rice.
Better:
1. Switch off, remove SIM and case, and dry the outside.
2. Leave the phone in a dry, airy place with the ports facing down.
3. Best of all, take it to a technician to open it, disconnect the battery and clean the board with alcohol.
The sooner the board is cleaned, the better the chance of saving the phone and the data.