Your 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 uses 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.