One thing worth mentioning.
Most of the Grove sensors use 3 of the 4 wires.
If you are using a sensor that uses all 4x, you can’t use the adjacent port.
This is because adjacent ports share a pin.
Socket D4 uses Arduino pins 4 and 5
Socket D5 uses Arduino pins 5 and 6
Socket D6 uses Arduino pins 6 and 7
So, if you plug a 4 wire sensor in D4, Arduino pin 5 is in use. Plugging something into D5 will mess with the data.
You can tell if your sensor uses 3 or 4 wires by checking out the pin labels on the PCB. If the 2nd pin is labelled NC, it stands for Not Connected and you have a 3 wire sensor. eg. SIG,NC,VCC,GND
If you have a sensor with pins labelled as SCL,SDA,VCC,GND - it’s a 4 wire I2C sensor.
SCL for Clock, SDA for Data, VCC for voltage and GND is ground.