Hello kirti15,
Thanks for reaching out to the Apple Support Communities. We understand you are looking for some information regarding a liquid detection alert you received on your iPhone. We are happy to help provide some guidance.
If your iPhone detects liquid damage, it does prevent it from being charged to stop any potential damage that might occur due to the liquid. We understand that in some instances, you may still need to charge the device to continue using it in emergency situations. If the alert isn't showing up any longer, it may be that the liquid isn't being detected, however if you do encounter any issues with the device moving forward, we would recommend having it inspected by an Apple Authorized Service Provider. You can read more about this here:
If you see a liquid-detection alert on your iPhone
Best Regards.