Most of Earth likely formed during the solar system’s first million years, study finds