You don’t need to drop your phone into water, sometimes ambient humidity is enough for this message to appear: this is how you can proceed safely.
Regardless of the fact that since the generation of the iPhone 7, Apple’s phones have some resistance to water, even if you use them as if they weren’t water-resistant (no, I don’t take them with me bare in the swimming pool or beach, and neither in the shower), from time to time you get a bit of a scare. I usually carry my iPhone around my neck and also in my hands, and it won’t be the first or the last time that one of the scariest messages appears on my screen: ‘Liquid found in the Lightning/USB-C connector.’
The first consequence of this message is that you can’t charge the phone and, in case you are charging it at that moment, Apple strongly recommends disconnecting the charging cable and leaving it for a few hours to dry. Throughout my life as an iPhone user, this has happened to me a few times and beyond the cold sweat, I’ve learned not only how to get it to dry, but also what to do and what not to do.
To charge or not to charge? There’s a trick to keep your iPhone battery going.
I insist: I don’t go into the water with the iPhone, and I’ve never even had an accident where, for example, a wave sweeps my towel away taking my phone. Sometimes it’s enough to have the phone exposed to the open air where there’s humidity, or directly when it’s raining, for a warning message to show up. And the worst part is that you usually find out when you’re about to charge your iPhone because the battery is low.
Even so, Apple usually offers the option of an emergency charge. That is, even though it recommends that the device (or the connector) dry out before charging, it allows you to supply power to it with the cable at your own risk. If there is humidity inside the connector and we insist on electricity passing through, the process could corrode the part or directly damage the device permanently. When in doubt, I don’t take the risk.
I have a plan B: I don’t like wireless charging very much (in short, it seems inefficient to me), but I always have my wireless charger handy for charging just by placing it on the pad. This leaves the connector area free to continue drying, but the iPhone’s battery gets filled without damaging components, which allows me to continue using it.
How to remove moisture from the connector safely.

From that moment on, I’ve bought myself some time: I have the iPhone fully charged and I under no circumstances, plug the charger into the socket. There are many methods to dry a phone: with rice, with alcohol, and there are even those who risk applying heat (spoiler: better not to), but for me, the former methods are impractical.
After all, rice might dry it out, but you can’t prevent a grain or dust getting into some slot. In that scenario, I prefer to place it vertically, with the charging port facing downwards so the water can drop by gravity and place a couple of silica bags next to it.
Given that in my case it is usually due to sporadic exposure to humidity or a drop of water and not because it has fallen into the water directly, we are talking about small amounts of liquid, something that is generally solved with a little patience and holding the mobile in a vertical position with the port at the bottom, shaking it a bit or giving it a few gentle taps.
I also keep the phone upright so that the water falls by gravity and place a kitchen paper underneath, which helps me to dry the charging cable plug. After leaving it to dry in a dry area away from direct sunlight for a while, I try again with the same cable or another one, as you never know if the problem might be in the cable.
Finally, I also turn it off completely in case it is a technical problem and to avoid functioning with humidity, and usually after a while, I can charge the phone as usual.