Leaving the food out to cool off after cooking
Some facts seem to be getting mixed up here.

Hot food is going to remain "warm" (i.e. in the danger zone) much longer if you leave it on the counter rather than in the fridge. That's basic physics. If the ambient temperature is colder, then the food will stay warm for less time, leaving less time for bacteria to grow.

There are reasons not to pop a huge boiling pot directly into the refrigerator, or more importantly the freezer, but they mostly revolve around the side effects - notably, that it will warm up other food, accelerating spoilage of everything else in there, and in some cases be very hard on your appliance (which needs to run at full tilt in order to handle all the heat).

Assuming you've got your food divided into small portions, you'll want to refrigerate them as soon as possible, or use an ice bath to cool them even faster as Jason mentions.