Can't have earth without stars first, end of story.
Can’t have stars without a place to put them, I.e. the heavens, or, space.
No it isn’t. As St Augustine comments, those early lines are talking about the creation of angels and men (heaven and earth). The “darkness” was not good, the only thing in His creation that was not good. It was the fall of the angels.
No one says “end of story” when interpreting the mysteries bound up in the book of Genesis. Rather it is the ‘beginning of story”, the story of God’s love.
That He would create intelligence first, that of angels and the souls of Adam and Eve, before creating the first natural thing, light, is very fitting. Whether it is “first” in order of time, or first in order of conception should not matter to us. For example, the builder of a great skyscraper has the image of the final product in his mind first, and the trenched foundation maybe last, but it is the foundation that is dug first. As Aristotle puts it, “what is first in mind is last in execution and what is last in mind is first in execution.”