A solid answer to a very relevant question nowadays…
It’s chilly in most of the US right now, so we’ll assume you’re worried about the interior of the window fogging up. The fogging occurs because of the temperature and moisture differential between the inside of the car and the outside of the car. Outside it’s cold and dry—it might not seem dry with all the snow and slush but winter air has very low humidity—and inside it’s warmer and moister thanks to your body heat and the moisture from your breath being trapped inside.
In an emergency, when you need the window defogged right now, the fastest way to do so is to rapidly lower the inside temperature so that the moisture stops condensing on the glass. Turning the defrost vent on without heat or opening the windows is the fastest way to dissipate the fog on the window. While fast, it isn’t very comfortable for the occupants of the car so it’s best reserved for times where you find the window suddenly fogging up and you need to see out in a hurry.
It’s significantly more comfortable to use your heater and employ other tricks to manage the moisture than it is to keep your car freezing cold. Warming the inside of the car and blowing warm air across the windshield using the defrost setting will evaporate the moisture. Skip using the recirculate feature if your car has it, you want to push the humid air out of the car and bring dry air in from the outside. You might be conditioned to use the recirculate feature to make the most of your AC in the summer but in the winter it doesn’t matter—your engine has more than enough excess heat to go around.