Distance from the Sun helped decide planet sizes
Close to the young Sun, it was too hot for materials such as water, ammonia, and methane to freeze, leaving mainly rock and metal to form small planets. Farther out, these materials could freeze and helped giant planets grow large enough to capture thick layers of hydrogen and helium.