When Did God Create The Sun?

Does The Bible say that plants existed before the sun? I (like many people) used to believe that the text about day 4 says that God created the Sun, moon and stars on the fourth day. This is not what the text actually says

But anyway, back to the Creation Age 4.

Then God said, "Let there be lights in the expanse of the heavens to separate the day from the night, and let them be for signs, and for seasons, and for days and years; (Genesis 1:14)
and let them be for lights in the expanse of the heavens to give light on the earth"; and it was so. (Genesis 1:15)
And God made the two great lights, the greater light to govern the day, and the lesser light to govern the night; He made the stars also. (Genesis 1:16)
And God placed them in the expanse of the heavens to give light on the earth, (Genesis 1:17)
and to govern the day and the night, and to separate the light from the darkness; and God saw that it was good. (Genesis 1:18)

I believe the sun was created during the “in the beginning” portion of the universe not on day 4, just before the formation of the Earth. Now, on day 1, you see in the 2nd verse of Genesis that the entire planet Earth is covered in nothing but water with absolutely no landmasses yet and that darkness is over the entire surface of the Earth (by the way, modern science agrees that the earth was in this conditions 5 billion years ago). According to what we know about planet formation, planets keep their thick array of gases in their atmosphere. In fact, the rule of thumb is that the larger a planet is and the farther away it is from the sun, the thicker it’s atmosphere will be, Venus and Mercury still have their thick gaseous atmospheres. Jupiter has an incredibly thick gaseous atmosphere. Earth departs from this rule however, in that, although it’s 20% more massive than Venus and further away from the sun, it has a very thin atmosphere. Scientists hypothesize that planet the size of Mars crashed into the Earth about 4.25 billion years ago. This collision even ejected the majority of the Earth’s primordial atmosphere and also was a part in forming our moon.

Now, to The Bible: one of the creation passages in The Bible is Job 38. In Job 38:8-9, God asks Job “Who shut up the sea behind closed doors, when I made the clouds its garment and wrapped it in thick darkness?” God is telling Job that the darkness on age 1 was a very thick cloud layer, a layer of many different kinds of gases such as methane and ammonia etc. I believe that when God said “Let There Be Light” that’s when that large planet collided with the Earth and removed enough of that cloud layer that the pre-existing sunlight was able to pass through from the outside onto Earth’s surface. It’s not until age 4 however, that the primordial atmosphere is removed enough that the sun, moon and stars become visible from the surface of the Earth (Genesis 1:2 seems to indicate that the frame of reference is the surface of the Earth). That’s the moment when God said “Let there be the great lights.” It doesn’t say that God made the lights or that God created the lights, but He says “Let The Lights Be”. That can be taken as “Let them appear” or “let them come forth and be visible”. But then the next verse says “God made the greater light to rule the day and the lesser light to rule the night. He made the stars also.” But it’s important to realize than in biblical Hebrew, there were no verb tenses to parallel our own. Instead they had 3 verb forms to describe

1: Actions completed at some time in the past.
2: Actions not yet completed.
3: Commands.

The verb form used on creation age 4 is the first one; actions completed at some time in the past. Therefore, what that tells us is that God created the sun, moon and stars at some unspecified time in the past which means they could have been created on day 3, 2, or 1 or before the planet Earth was formed.