This could be caused by several problems and the issue could either be with the battery, charger, or simply how many programs you running. If you are using bluetooth or wifi in the background and do not need them try turning those off. Also if you have your screen brightness turned up high try lowering that as well because it could be draining extra battery. Lastly try and close any background applications that you don't need to be running.
If you have tried this and still have a problem then it could be a problem with the charger or battery. I recommend using the official charging cable if you aren't already and if you have a spare try charging with that cable.
As a last resort the problem could be that your battery isn't working properly and will have to be replaced. Avoid overcharging the device and also try not to let the battery life drop all the way down before recharging. It is optimal to keep the battery life at 60-80%. Try that for a couple of days and if you still have trouble then the battery most likely needs to be replaced.