After 14 yrs experience w/several different phones, i'm pretty sure the problem is usually due to 1 of 2 things.
1) Usually it's the CABLE! For me, replacing the old cable w/a new one seemed to always fix it. Old/cheap cables don't just 'break'. Some of the individual wires begin to break over time, restricting the electricity flow.
2) Old chargers or USB ports w/low-voltage/Amp output charge really slow compared to modern chargers & USB standards.
3) Regardless of the cause, you'll get better/quicker results if you limit the number of things running on the phone in the background as you charge. The last person's suggestion of resetting the phone could help, but beware of losing settings &/or data that you might want to document or backup first.
By the way... i don't know if this is permitted here or not. If not, hopefully they'll just edit-out this paragraph rather than not-post my whole message. Regarding good quality cables and charging banks, check out MagFast. https://magfast.kckb.st/69f0242f