It is common knowledge now to immediately put your iPhone or other electronic devices in a bowl of uncooked rice after being subjected to water damage in the hope that the uncooked rice will absorb all the moisture in the device in order to save it and restore it back to normal, but this is not a good idea, in fact, Apple recommends not to do this.
Despite the iPhone's water resistance rating, if exposed to or submerged in water for too long, moisture can penetrate the sensitive electronic internals that can cause the device to shut down.
The best thing to do at this point is to immediately turn the device off, remove any casing that you might have over your iPhone and open the sim card tray and then wipe off any excess water that might be on the iPhone.
If you were to now submerge the iPhone into a bowl of rice, you are then allowing the starch of the rice and other particles to enter into the device which could be potentially more harmful.
Take a look at the video below by the YouTube channel: Apple Explained on Why You Shouldn't Put Your iPhone In Rice...