If the 5n1 is oriented so that the main pcb board is at the top and the rain gauge at the bottom (which is how it is in the picture I took), then the four holes where you connect the cable will be oriented north and south. The red wire is in the most north hole. I don't know if your 5n1s are exactly like mine. I would suggest you trace the wire from your current temp/humidity sensor back to the main pcb board. The temp/humidity sensor should have markings for the wires showing VSS, VDD, SDA, and SCL. As I recall, SCL is the red wire. So, I would trace that back to the main pcb board and note which hole it is connected to. Then just be sure when you get the new sensor, you connect is the same way. In the end, if you connect the wires in reverse order, you will have very noticeably incorrect readings. If that happens, just reverse the wire order.
Easiest thing is to just trace the wires from your old sensor before you disconnect it and note on the main pcb board where the SCL connection is to be made and then make sure your red wire on the new sensor connects to that location.