When you put hot food in the refrigerator it takes longer for the food to cool down to a safe level in the refrigerator.
However if you leave the food out to cool down it will take the same amount of time or even more time to cool down so I don't personally see it as a safety issue as some people do.
I would think it's better to put the hot food in the refrigerator so it can cool down faster than leaving it out to cool before putting it in the refrigerator.
I've been putting hot food in the refrigerator for years and haven't gotten sick or had any problems doing so.
You could also cool the food down quicker by placing it in the freezer to allow the hot food to cool more quickly.