Condensation only forms when a cool/cold surface is moved into a warm/hot humid environment.
If you warm the cool/cold surface before moving it to the temperature of the warm/hot humid environment condensation will not form.
Moving a warm lens out into cold air does not cause condensation, but going back into a warm house with a cold camera could cause condensation to form if the humidity inside is high enough.
The front lens element can cool to less than the ambient air temperature.
It happens to my telescopes if I don't take precautions.
I use a dew shield on my finder scopes and on the main optical tubes of my telescopes.
The dew shield I add to my 12" 1500 mm focal length telescope when I anticipate dew on my optics will be a problem is 20 inches (50 mm) long.
The dew shield for my 25 mm focal length finder scope is 11.5 mm long.
A lens hood can function as a dew shield, but lens hoods tend to be short so they don't vignette the lens field of view. To make a dew shield long enough for a camera lens that has a short focal length isn't practical.