Check if cable can pass data. If can pass data, then problem lies elsewhere than phone and cable, which means fault is charger.
Check if charger can fast charge other devices, if can, it means the problem comes from phone.
Try and find which link of the chain is the problem