Hello Mxkiyah,
For difficulties with charging your iPhone consistently you'll want to take the steps below:
1. Check your charging cable and USB adapter for signs of damage, like breakage or bent prongs. Don't use damaged accessories.

2. Use a wall power outlet and check for firm connections between your charging cable, USB wall adapter, and wall outlet or AC power cable, or try a different outlet.
3. Remove any debris from the charging port on the bottom of your device, then firmly plug your charging cable into your device. If the charging port is damaged, your device probably needs service.

4. Let your device charge for a half hour.
You can also find those steps in this resource: If your iPhone or iPod touch won't charge - Apple Support
Should that still persist, are you able to try charging your iPhone with another cable, USB power adapter or wall outlet? That should help to further isolate this behavior.
Let us know your results, and we'll keep moving forward from there.