Hi Oryaakov231,
Thanks for your post! It sounds like your iPhone had some accidental damage or contact with liquid, is that right? If so, we've got the resource for you!
If the 'Charging is Unavailable' or 'Liquid detected in Lightning Connector' alerts have appeared, you'd want to follow these steps: If you see a liquid-detection alert on your iPhone
If you no longer see these alerts while charging, then the Emergency override is disabled or the accessory/iPhone is no longer wet.
In case you'd like to run a diagnostic or seek service:
To allow Apple to run a diagnostic, Contact Apple Support
To seek service, Find a Location and Get your iPhone, iPad, or iPod touch ready for service
Hope this helps out, cheers!