As Robin says, a dew shield considerably reduces the amount of cold sky that the lens ‘sees’. Without it the lens will quickly radiate it’s heat to that cold sky and receive little heat from the sky in return. That loss in heat will cause the lens to go below the dew point of the surrounding air and water will then condense on the glass as a result- it will dew up. The night sky typically has a radiative temp in the UK of -10C to -30C. Last night, for example, I measured it as -26C.
The lens will try to reach radiative equilibrium with that cold sky but is prevented from going too low by the heat it receives by conduction from the bath of warmer air it is sitting in and the warmth it receives again by conduction from the scope tube etc. It is a battle between radiative loss and conductive gain. That is why a breezy night where the transfer of heat from the air is more efficient the battle between radiative loss and conductive gain is more likely to be won. Also reduce the amount of cold sky you see (reduce the radiative losses) and that makes it more likely to stay dew free.
A dew cap does not work by trapping warm air as some books will say.