It would help greatly, if you named the bike, and the motor fitted, also what year the bike was made. Post photos of th motor, the controller and display, the whole bike so folk can best help
Sounds like you've separated contact with one of more wires in the connector. I would search the internet for the brand of motor to see if the connector and wire ends are available.
If this search fails, then an alternative connector from another ebike motor will need to be spliced in.
When I have connections like this I use heat shrink to cover the connection. Alternatively which is very good, self amalgamating tape, which chemically seals against itself when half wrapped around a wire or connector