Hi Ayla2me,
If this is happening with an Apple Lightning cable or accessory, then reach out to Apple Support directly to help investigate the behavior. They'll be best equipped to find the best resolution. You can see that suggestion outlined in the article below:
If you see a liquid-detection alert on your 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."
Kind regards.