If it's truly a significant vibration, first I'd check the exterior for physical problems or assembly issues. Loose/broken spokes, cracked/bent/warped rims, warped/loose brake rotors, reasonable tire pressure, etc. Suspend the bike and see if the wheel has a reasonable balance (turn 45 degrees, see if it settles quickly to fixed point - try again and again from different starting points to see if there is a common and obvious heavy spot.) If you can't find anything obvious, some other troubleshooting to determine if you can tie it specifically to throttle input, pedal input, PAS levels, specific gears, etc. It's under warranty, so once you have some better details, contact your dealer or Ride1up.
I've read several references to hall sensors or shorted/broken 3-phase wires being a potential cause of hub vibration, as well as pinched harnesses, but it really could be a bunch of things. If it's still on warranty, don't mess too deep. A cheap hub motor tester off amazon would let you test the internals without removing it, but you shouldn't have to go buying diagnostic tools for a new bike just yet. Use your warranty before it's too late.