Charging problems can occur if the battery has been removed and inserted in a wrong way. The contact pins on the battery may get bent, causing poor connection between the phone and battery. To avoid this, you should remove and insert the battery in the right direction as instructed in the user guide.
Note also that if you change the battery in your phone, you should wait a minimum of 15 seconds before inserting the new battery into phone. This ensures that the phone has enough time to react to the change of the battery capacity level.
If you have issues with charging, e.g. you can see charging indicator on the screen but even after a long period of charging the phone can’t be booted up as expected, you may have to take your phone to Device Care point for inspection.