Understand that ambient temp is the temp of the air that surrounds/feeds a component. So if you think about a cpu air cooler, the ambient air is what's inside the case, same with a top/rear mounted liquid cooler and almost all gpus in a standard configuration. Mostly, only a front mounted liquid cooler uses Room ambient air.
So consider there's a gpu, cpu, chipsets, ram, other small heatsinks giving off heat inside a case. This is where airflow matters most, a well ventilated, good airflow case can get most of that radiated heat out of the case, so case temps stay just a little above Room ambient temp. In a poorly ventilated, bad airflow case, case ambient temps will be considerably higher than Room ambient.
This is important because it's physically impossible to cool a cpu to below ambient temps by mechanical means. A fan blowing air across a heatsink is mechanical process, it'd take a chemical process like liquid nitrogen to get below ambient.
So if your room temp is 40°C, expect that you'll generally see 43ish°C to 50ish°C inside a case, putting the absolute minimum a cpu temp will be is @ 45°C to 55°C. Generally an intel cpu will be @ 6-10°C higher, an AMD cpu @ 10-20°C higher than room ambient depending on the cooler's efficiency.
Airflow matters.