Before suspecting the phone, check the simple things.
1. Use a wall charger, not a laptop or car USB port. These give much less power.
2. Try another cable and adapter.
3. Clean the charging port.
4. Close heavy apps and turn off hotspot while charging.
5. Turn on airplane mode to charge faster if you're in a hurry.
6. Let the phone cool. Hot phones charge slower on purpose.
7. Check the battery health. A worn battery may charge strangely.
If the phone still charges slowly with a good charger and cable, measure current with a USB meter. Very low current with a good charger points to the charging port or the charging circuit.