Hi ankitas03,
We are going to post an excerpt from the If your iPhone or iPod touch won't charge resource that we think will be helpful:
If your device stopped charging at 80 percentYour iPhone might get slightly warmer while it charges. To extend the lifespan of your battery, if the battery gets too warm, software might limit charging above 80 percent. Your iPhone will charge again when the temperature drops. Try moving your iPhone and charger to a cooler location.
iOS 13 and later use Optimized Battery Charging to slow the rate of battery aging by reducing the time that your iPhone spends fully charged. Your iPhone uses on-device machine learning to understand your daily charging routine so that it can wait until you need to use your iPhone to finish charging past 80 percent.* Optimized Battery Charging is active only when your iPhone predicts that it will be connected to a charger for a long period of time.
We hope this resolves things for you.
Take care.