It's pretty straight forward. It's mostly find a wire color with a male connector and find the same color wire with female connector and plug them together.
If you have wires left over, tell us the color.
Hopefully, you are cleaning both the male and female connectors. Make sure the female grabs the male firmly. (hm, that sounds pretty good, don't it?) But, we are talking terminals, here.
A needle nose pliers helps to get the terminals re-engaged firmly.
Also, to keep the terminals from oxidation, coat them with dielectric grease, or find and use some spay, called De-Oxit.
Cheers,