1 In the beginning God created the heavens and the earth. 2 Now the earth was formless and empty, darkness was over the surface of the deep, and the Spirit of God was hovering over the waters.
14 And God said, “Let there be lights in the vault of the sky to separate the day from the night, and let them serve as signs to mark sacred times, and days and years, 15 and let them be lights in the vault of the sky to give light on the earth.” And it was so. 16 God made two great lights—the greater light to govern the day and the lesser light to govern the night. He also made the stars.
Genesis 1:1, 2, 14-16
The Bible posits that the Earth existed prior to the stars. However, solar systems form after stars explode. A stellar explosion is known as a supernova. Solar systems can also form by way of black holes. A black hole forms when a heavy star collapses in a supernova. Thus, there is empirical evidence proving that stars existed prior to the formation of our solar system, which includes the Earth. Without stars, there are no supernovas and without supernovas, there are no black holes. Therefore, without either of these stellar formations, solar systems are impossible to form.
Read below for more information regarding the formation of the solar system:
By the way, the greater light (the Sun) is also a star. The moon isn’t a lesser light. Moons are similar to planets in many respects. Moons have mantles, inner and outer cores. There are even moon quakes. Further, the Moon has perplexed scientists for decades because of its dual surface. The Moons surface differs from one hemisphere to the next. The Moon wasn’t created; it is a byproduct of a collision. Either it is a byproduct of a planetary collision or the collision of the proto-Moon and another smaller satellite that orbited the Earth billions of years ago.
For more information on the formation of the Moon, read below: