The number of times your iPhone may not be charging due to it actually being faulty is fairly minimal, and more often than not, it’s the cable at fault and not the phone itself.
The iPhone 6 we have wasn’t charging and after checking the obvious we then hit Google. Some articles later, and we were lead to check if lint wasn’t to blame.
Sure enough, if you hit search you see the following results:
The essence of it is to make sure your iPhone is backed up, turn it off, and then use a normal toothpick to pick out any fluff and stuff that the Lightning port has attracted from your trouser pocket. In our case this fixed the problem!
Better still, it cost nothing 🙂
For more info you can read the following: https://www.cnet.com/how-to/use-a-toothpick-to-clean-out-your-iphone/