For the motor, if it has two hall sets, but only one phase set, then it shouldn't matter which one you use, one is typically just a spare. If your original setup used both, then there may be more than just halls in there, and it may matter which ones are used where.
For the rest, without knowing what specifically you have, there arent' any direct answers. Even knowing what you have only helps if it's the same as something we've already seen before. (there are literally millions of devices out there)
Normally a seller will at least have a basic, poorly -translated, wiring chart or diagram. If you post that, it might help us help you to figure out which wire is which on the controller itself.
Then if you can post any information you have on the old controller, we can help you match wires between the two.
If you post any information you have on the things being hooked up to the controller (throttle, ebrakes, motor, displays, etc) we can see if any of it leads to being able to match them up.
For now the best I can offer is that in some of these threads, advice is given on how to trace out and measure your wires to see which one is which. it should be easy enough to tell by title which ones are potentially useful.
https://endless-sphere.com/forums/search.php?keywords=controller*+wir*&terms=all&author=&sc=1&sf=titleonly&sr=topics&sk=t&sd=d&st=0&ch=300&t=0&submit=Search
https://endless-sphere.com/forums/search.php?keywords=controller*+connect*&terms=all&author=&sc=1&sf=titleonly&sr=topics&sk=t&sd=d&st=0&ch=300&t=0&submit=Search
As a last resort, some people have had to open up the controller to see where the wires go on the board inside, which can indicate what their functions are. Similarly, sometimes the handlebar controls may have to be opened up to determine which wires are which.