The danger zone for perishable food is between 40F and 140F or 4C and 60C. If your food is in that range for more than an hour, do not try to refrigerate it again, but you can still eat it safely. If it has been in the danger zone for over two hours, you do not eat that. You throw it away.
This is why you do not let things thaw out in the open sitting in the sink. The outside of it is in the danger zone while the inside is still thawing. Defrost things in the fridge or run cold water over the packaging for a bit.
Also it is not best practice to put covered boiling hot food in the fridge. That will make the inside of it be in the danger zone for longer. Let your food cool off uncovered at room temperature for about half an hour first or place it in its container in an ice bath for about ten minutes. Whichever you’d rather do.
For the record for anyone worried, it won't kill you if you don't strictly adhere to this but you will absolutely have tummy troubles. If you've got issues with IBS etc, maybe try adhering to these rules and see where it gets you. You do have an immune system for a reason but it's best practice not to test it too far
You increase your risk for food poisoning every time you break food safety rules. Food poisoning is usually not deadly but it can still be dangerous and still has a chance of causing damage to your system. And food safety can absolutely save your life or save you from permanent injury under the right circumstances. I sustained permanent damage to my digestive system and lost my ability to fully absorb vitamins from a bacterial infection and I have to take vitamin supplements for the rest of my life now. I spread this information to reduce the risk of something similar happening to others.