fried or overused battery. most iphones have a special setting you can turn on that stops the phone from charging past 80% when idle for long periods of time to preserve battery life. usually iphone batteries will start to expand after the battery health goes past 30% (iphone 8+ standards). also could be the charger you're using, normal iphone chargers are pretty reliable but lightning cords can occasionally short circuit and not be able to conduct enough electricity for your phone to display its charging.
👍