This may be your charger its best to use the one that came with phone if your using that one its possible it needs replaced u can test charger on another phone to find out
phone batterys weaken over time so a new battery may an option
Your charging port may not be working/ faulty check and make sure theres nothing in it and clean carefully if no sucess this part may need 2 be replaced
Hope this helps