@BrickFPVas long as all 3 wires go to the same motor output. I'd recommend trying to match the way they are now. Not having to redo motor orientation can save you some headache :)
Always solder you motors just like they come off the motor to the flight controller. If they are not rotating in the proper direction, just switch any two wires to change direction of rotation or change rotation in Beta Flight.😁
the order the wires are soldered determines which way your motor will spin, CW vs CCW... BUT you can also use the betaflight config to change the direction in the software if it happens to be the wrong way.