Different vehicles can have several hundred or even several thousand volts difference between their baseline electrical potentials. How do they ensure that upon first contact, there isn't a massive electrical discharge between the two that damages a huge amount of hardware?
See @msalters comment on a related question which links to a paper on the subject. From a quick read of the paper, what seems to happen is that in LEO (ie at the ISS) the plasma (ionized gas) of the extreme upper atmosphere is conductive enough to keep voltages reasonably low and to allow any difference to be discharged relatively slowly as the two spacecraft approach contact. They seem to think there might be a problem for the Orion capsule if it has its solar panels open and in sunlight at the time of docking. Certainly sunlight on some materials can result in charge building up. They also flag up for further study potential problems docking further away from the Earth where there is less plasma.