Try turning off the device, remove the battery, then take a safety pin and compressed air and scrape out any dust I'm the usb-c port then spray with air. I had a issue with my phone charging but not getting data. I spent a solid 15mins doing the above and it fixed it.
A good test is to see how firmly the usb-c sticks in the port. If it comes out pretty easy or feels seated sloppily then it probably just needs a good cleaning.