"When you connect a Lightning cable or an accessory to your iPhone XS, iPhone XS Max, iPhone XR, or later, your iPhone can warn you if there's liquid in the Lightning port."
If you see a liquid-detection alert on your iPhone, read this support article for what to do --> If you see a liquid-detection alert on your iPhone - Apple Support
"If your iPhone or Lightning accessory is wet"
See the instructions on drying an iPhone.
"If your iPhone and Lightning accessory aren't wet
- If you see this alert every time you connect a certain cable or accessory, that cable or accessory might be damaged. Contact the manufacturer.
- If you see this alert every time you connect an Apple Lightning cable or accessory, contact Apple Support" by clicking on this link --> https://getsupport.apple.com/?caller=kbase