Heard of the Goldilocks zone?
It’s the idea that an area of space around a star will be at the right temperature for life to exist. Not too hot, not too cold, hence Goldilocks.
It’s a bit like standing around a campfire on a very cold night. Stand too far away and you freeze, stand too close and you catch on fire and burn to death.
It’s the same with planets orbiting stars too, if they’re too far away then water freezes and life can’t emerge, and if they orbit too close the planet is roasting hot and nothing can live.
It gets a bit more complex than this though, but complex in a fun way. Oh and its also got some pretty big implications for the search for extraterrestrial life…