Although this behavior of the smartphone can be annoying and even frightening, if you do not know its causes, it is most likely not a problem, but only a feature of the system settings. Let's figure out where to look for the right setting and how to disable it, as well as what to pay attention to if it does not help.
Not everyone knows this, but iOS has something called "Optimized Charging. The option appeared in iOS 13 and is enabled by default. Its purpose is to prolong the life cycle of the smartphone battery by not charging it to 100%. To do this, the system evaluates the scenarios for using the smartphone, and if it assumes that you will not stay long without power, it forcibly ends the charging process at 80%.
This approach has its own logic, because we know that maximum charge, as well as full discharge, is not good for the battery and shortens its life cycle. However, to make full use of this feature, the user must understand how it works.
To find it, go to Settings - Battery - Battery status. Here you will find the "Optimized charging" switch. If you want to disable it, the system prompts you to do it permanently or for one day. If you are not satisfied with the scenarios suggested by the system, you can disable optimized charging completely or, leave it up to the smart tech. Either way, now that you know how things work, you can thoughtfully use optimized charging in a way that won't harm your smartphone or your plans.
If you have turned off optimized charging, but the battery is still not charging fully, there may be several reasons for this and they are all related to overheating, which, as we remember, is very dangerous for the battery:
Using resource-intensive applications while charging;
Use of non-original cable and charger of improper quality;
cover that interferes with normal heat dissipation;
the smartphone is exposed to direct sunlight or the room is simply too hot.
That's all. As you can see, on closer inspection, Optimized Charging turns out to be quite an interesting and useful option, and you just need to use it properly.