If a bike stops working that was ok before then look at the following first:
1. Check battery voltage and does the led/lcd come on and stay on ? If yes then go to #2,3 & 4. If no then look at battery fuse and power connections.
2. Disconnect throttle.
3. Brake sensors/cut outs if fitted disconnect them and try operation without them.
4. PAS if cadence pas on a hub bike, check the magnet disc is fixed and only rotates when the crank rotates, check sensor to disc alignment and the gap between the two is about 1mm.
Once you get PAS working then reconnect brake sensors to rule them out as an issue, then reconnect the throttle to rule out as an issue. If reconnecting any of these two stops operation then you will have found the fault.
If the motor fails to operate then some diagnosis using a meter will be required for the next step.