A couple times a year, I cook up a large batch of chicken soup. I cook it for 3 or 4 hours with the lid on loose. Then I turn the heat off and put the lid on tight. It is now sterile and can sit for hour with no bacterial growth. And I mean none. Then I put strain it and put the soup into containers and into the freezer quickly.
I don’t have the article handy but Cooks illustrated’s opinion was let the food cool to room temperature before putting it into the refrigerator. Their thinking was…a refrigerator is good at keeping cold things cold but not much better than a counter top at cooling hot things down. The hot food however is pretty good at warming the refrigerator.
I like an ice bath in the sink for cooling soup and love my porch in the Winter for the same job.