The motor doesn't help when you pedal. Most likely cause: assist level 0, a brake lever or sensor that's on, or a pedal-assist sensor that's out of place. Try this first: set the assist level to 1 or higher.
The pedal-assist sensor reads a magnet disc behind the crank. If it slips out of place, assist stops. Photo: Dr.-Ing. S. Wetzel, CC BY-SA 3.0 DE, via Wikimedia Commons (resized)
Pedal assist relies on a sensor that detects your cranks turning (or, on torque-sensing bikes, how hard you push). If the assist level is 0, a brake sensor is active, the sensor's magnet ring has slipped or cracked, or its cable is damaged, the motor won't help. If the throttle still works, the motor and battery are fine and the problem is almost certainly the sensor or a setting.
Step-by-step checklist
Work from the top. Steps go from free and easy to shop jobs. Switch the bike off before touching any connector. Tick each step as you go. Your progress is saved on this device.
As an Amazon Associate I earn from qualifying purchases. Steps marked "affiliate link" link to Amazon.
When it's time for a shop: if you've worked through every step and the problem is still there, take the bike to an e-bike shop. Bring your notes on when it happens, plus the code.