Zephak said:
The whole link doesn't open, but this part does
https://www.amazon.com/dp/B07WFRXPJH
and provides this image for connections:
https://m.media-amazon.com/images/I/61UchC+ZPDL._AC_SL1500_.jpg
On that, the throttle wires look like typical colors that often (but don't always) mean
black-ground
blue-signal
red-5v
You can measure on the controller itself with no throttle connected, just battery, to see which is which, using battery negative for your meter black lead, meter on 20VDC. You'll get 0v for ground, about 5v for 5v line, and anything at or above 0v for signal.
The included throttle picture looks just like a couple of hall throtles I've worked with. Most of the pot throttles have a different, often larger, part next to the grip where it mounts to the bars (to fit the pot and sometimes gearing to turn it from the grip). (you can look up Magura or Domino for a couple of well-known pot throttle types, if curious).
Additionally, it says 1v-4v on the controller, which is for the throttle signal range, and that is for a hall throttle (a pot throttle can work but will have some deadzones at top and bottom of range where it doesn't do anything or doesn't change the motor speed).
Curiously, the old one, when tried, caused the motor to turn something internally and drew 7watts, but didn't turn the sprocket.
That probably means there is a freewheel or clutch inside the motor so it only turns the sprocket in one direction. Swap the motor wires and it should then run the sprocket.
But it does mean that most likely all other wires are correctly connected.
The yellow blue pair to the motor is a question. I have yellow from controller to pos motor, blue to ground.
The order determines motor spin direction.
Curiously, there are a pair of white wires on the motor and I tried jumping them. Also there's a red, white and black set that I tried putting the throttle in series with the throttle.
White wires on the motor could be a temperature sensor or thermal breaker. What does a multimeter read on them when set to 200kohms? Does it change as the motor changes temperature?