First, does the bike work correctly? If not, there are a number of things we'll have to know to help fix it, starting with exactly what does or does not happen, and exactly what specific parts it has (motor, controller, battery, display, etc).
Regarding the plug question:
Wheel sensor is usually just a speed sensor, like you would use for a bicycle computer / speedometer, that is mounted on your fork or frame, with a magnet on the wheel spokes. Which wire is used for which thing you'd have to test, but it is likely that red is 5v, blue is ground, and yellow is signal. (but any wire could be used for any of those, as wire colors are not standardized in these things even nowadays).
If you don't have an actual separate wheel sensor on the bike, then you'd just ignore that connector.
The 9 pin connector usually has 3 thick phase wires in it, that actually drive the motor, and 5 wires for the three motor position / rotation sensor hall signals plus their power and ground. Sometimes a final wire is used for a temperature or wheelspeed sensor, sometimes it's not used at all.
There are two basic kinds of controllers: Sensored, that require the hall sensors noted just above, and sensorless, that only use the three thick phase wires. There are some that can do either one, either automaticaly or via a setting in their display or computer-based or phone-based setup program/app (that comes from the controller manufacturer).