It's a hall sensor issue. The controller isn't receiving the right signals.
The no.1 cause is the motor connector not pushed in all the way to the marked line.
The no. 2 cause is melted wires at the connectors where they join to the controller, normally as a result of going too slow for too long up steep hills or when connectors aren't pushed in properly.
The no.3 cause is water in the motor shorting out the hall sensors, especially if the wheel has been taken out and put back in upside down
The No.4 cause is damage to the motor cable where it comes out of the motor due to mishandling or a fall.
After that, there are several unlikely, but not impossible causes. the hall sensors could be blown, but they don't blow for no reason - see above.
Can I do any more to emphasise the bit about the marked line before we get the answer back that you checked the connector and it looks like it's in tight?