When you have an ebike that doesn't work, you can either test it to find out what's wrong and fix that, or you can start replacing parts. The latter method can be very time consuming, expensive and frustrating.
To fix any ebike, this is how you check it with everything switched on that you can:
1. Measure the voltage at controller's battery connector. Obviously should be battery voltage. 36v - 42v for a 36v battery would be an acceptable range, but if you've fully charged the battery and it's less than 41v, it needs some sorting.
2. Measure the voltage on the 5v rail. You can measure that between any ground (black) and any of the reds going to throttle, PAS or motor halls. It should be around 5v.
3. Check throttle signal wire voltage on it's connector while connected. it's the wire that's not red or black on the throttle connector. Should give about 1v to 4v when you twist the throttle. If there's more than one wire, your meter will find it. It's the one that's between 1v and 4v, assuming that it works.
4. Check that the pedal assist sensor is pulsing. Measure the PAS signal wire while turning the pedals slowly. Should pulse 5v on and off every time a magnet passes the sensor. The signal wire is the one that's not red or black.
5. Check the motor hall signal wires (blue green and yellow) on the motor connector at the controller. They should each pulse with 5v going on and off as you rotate the wheel BACKWARDS.
6. Mosfet test. Disconnect the motor cable and battery from the controller. Measure the resistance (200k scale) between the red battery connection and each of the three phase wire connections, then repeat with the black battery wire. Each set of 3 readings should be the same as each other and in the range 7K -24K. Though can be higher as long as they're all the same. Due to the capacitor across the battery wire, you can get a constantantly changing measurement while it charges. In that case, try swapping your probes round. Even though can be a moving result, the only important thing is that all three move in a similar way.
If your bike passes all those tests, it should work, so then you can look at any settings or other logical causes, like stuck brake switches, PAS installed backwards.
When checking whether the motor will work, always disconnect all unessential connectors, like PAS (if you have a throttle), lights and brakes.