Have you tried using the other USB-C ports to charge the laptop? Sometimes one port can go bad.
Disconnect all external devices in case one of them is causing the problem.
Are you using the proper power adapter for your laptop? If you happen to mix up power adapters and are using a smaller adapter, then it could cause this problem.
Try unplugging the power adapter from the electrical outlet for a minute to let the power brick circuitry reset. Try an electrical outlet on another circuit or at another location.
Try the steps in these Apple articles:
https://support.apple.com/kb/HT204652
https://support.apple.com/en-us/HT204267
Have you tried running the Apple Diagnostic?
If these steps don't help, then you should take the laptop and your power adapter & cables to an Apple Store or an Apple Authorized Service Provider to be examined.