If so it's a bad piece/board in your phone. Check your receipt since most phones have a 1 year warranty.
Well I have an LG K8 2017 and it wont charge, I checked the battery but there's nothing wrong with it because my friend has the same battery ( he's annoyed since we switch when my phone battery is low ) I checked the cord and the box but they work fine also the phone port cant be dirty because I hold my phone 80 present of the time. What do you think is the problem??