who told you that? Space is cold breh
The easiest way to see this in action is understanding that space suits are
not heated, they are merely insulated to provide a mini version of the insulation the atmosphere of earth would provide.
Space can be either cold or hot do to the nature of how heat absorption works. This is why you can both freeze to death or burn alive on the surface of the same planetary bodies merely depending on whether you are in shadow or direct sunlight.
In alot of movies/cartoons you will see astronauts trying to outrun the shadow of the sun setting on a planet. This is done for dramatic effect, but its largely correct. If the sun is up its hot, if its down, its cold. But on earth we have things like cities that insulate heat and hold it even in darkness. Merely laying a concrete parking lot often raises temperature in the area by several degrees cause the cement stores heat. In space and barren planets there is nothing so once you lose direct contact with sun/star rays the heat immediately begins to dissipate.
(check the temperature section if you want to learn more)
How Space Suits Work
The astronaut provides the heat and the space suit keeps it inside like wrapping a baked potato in foil.