In this day and age of phones with cameras it's always a good idea to take a picture of just about anything you are about to disassemble or disconnect. This will give you a path back to reassembling or reconnecting correctly.
With wiring, if the battery was not there and you are trying to figure out which wire goes where the SAFEST way is to trace each wire back to where the other end is connected. In most battery systems at least one of the negative wires won't go far before it's connected to the frame. The other may enter a junction box where it joins other "ground" wires.
When you find out where each goes MARK THEM. Wrap the wire right next to the connector with color coded tape, black for Negative and Red for Positive (or white for Negative if you prefer). I have some black and red heat shrink tube that I used to mark my battery cables. The unused portion of the combination terminals on the battery are also painted. Positive Red and Negative Black just using some enamel I had laying around. The threaded stud is where I connect the battery cables and I keep those "wire brush clean.
"A wise man can change his mind. A fool never will."
"You only grow old when you run out of new things to do"
2018 Flagstaff Micro Lite 25BDS
2004 Nissan Titan