You're using an iPhone, right?
The iPhone may heat up a bit while charging. To extend battery life, if the battery becomes overheated, the software may limit charging when the charge exceeds 80%. When the temperature drops, the iPhone charges again. You can also try moving your iPhone and charger to a cooler location.
If it is used by Apple mobile phone, it is recommended to choose a mobile power supply with Apple MFi certification and in line with the new national standard, such as green Apple mobile power supply.
The mobile phone has been charging but has been at 5%, which may be that the tail plug of the mobile phone is broken, or it may be that the interface of the mobile phone charger is not properly contacted. You can go to an original charger or go to the mobile phone store and ask the staff of the mobile phone store to check the problem of the tail plug. Most of them are the interface of the charger is in poor contact, so you can change a charger to try charging.