Precambrian comes first, taking up 88% of the Earth's geologic time.
Some hold that the Earth coalesced from material orbiting the Sun around 4.54 billion years ago. It might have been struck by another planet, called Theia, shortly after it formed, splitting off material that formed the Moon. By 4.43 billion years ago Earth has developed a stable crust.
Still a long way to go!
(My quote is a borrowing from the Book of Genesis. Just thinking about it makes me shiver.)