Along with an HDMI cable, it comes with an AC power adapter with a USB-C plug on the end. It's not a USB cable, so you can't detach it.
If you're buying a Pro Controller or Charge Grip, those will come with a regular USB-C cable.
Extra Switch Dock Sets come with an AC adapter and a HDMI cable.