Windows of a parked car can fog up if you stop after driving for some time. During this time, the internal and external temperatures become varied.
After stopping, the heat from your car causes condensation when it touches cooler air near your windshield.
However, if your car stays parked for a significant period, the fog should clear up on its own.