There’s a few different reason why a battery would take longer to charge:
1: Could be the charger cable/brick/outlet going bad. Try using a different cable or brick and see if that improves. If you any damage or bent pins on the charger this is probably why it’s going slower.
2: Bad/dirty charge port on the phone. Dirt and dust can sometimes get lodged inside, especially if you keep your phone in your pocket. Turning the phone off and blowing some compressed air in the port can get the debris out (be sure to hold the can upright). You can also use some isopropyl alcohol (the higher the percentage the better) and a toothpick/tweezers to clean the port out. Just be careful not to damage the connector inside (Micro-USB is very delicate).
3: Bad battery. Could just be the battery going bad and needing to be replaced, common older devices.
Personally I’d try cleaning the charge port out first, then trying a different cable. In my experience it’s usually the charge port. 😊