Check your cable. Flip it 180 degrees. Regardless you it works or not, you have to test with a new cable but you know for sure that the cable is the issue if flipping it 180 degree helps.
You can get a new cable on warranty but first you need to know if it's the phone, charger or cable