the problem is it works for like 500 meters and then it stops,
could it be that my battery cable is just broke?
If the battery gauge lights are still working, it means that adequate power is getting to the motor and the battery lead should be OK.
(Unless there is a break somewhere between the moulded junction block on the motor harness and the speed controller within the motor.)Double check that it's not a sticking brake lever, as that could cause the lever switch to stop the motor from working.
And check for a short somewhere in the brake switch wiring where you have soldered the connections, it might be that the insulation has moved
(or worn through on a sharp edge of a soldered joint) causing the wires to touch.
I would check the battery voltage (and the battery gauge lights) when the fault occurs, to rule out any possibility of battery or
BMS failure.
Alan