Things don’t just “cool down” in space.
There’s no atmosphere to transport the heat away. So something that gets hot in space, stays hot.
So when we put astronauts on the moon, and they’re in the sun and start heating up, their suits have to actively cool them down, or they’d heat up until they died.