Here's why:
* Formation: The Sun formed first, about 4.6 billion years ago from a giant cloud of gas and dust. This cloud collapsed under its own gravity, and the Sun's core ignited, starting nuclear fusion.
* Earth's Formation: The Earth formed later, from the remaining material in the solar nebula that didn't go into the Sun. This material clumped together over millions of years.
So, the Sun is about the same age as the Earth, but it was born first.