Yes, this certainly is problematic. And the reason maybe because of traditional understanding of Gen. 1:1 & 1:2, which should be re-analyzed.
Gen. 1:1 should be interpreted as “did not” come from anything that can be seen”(Heb 11:3 NLT). Meaning, that the Creator God Logos (John 1) simply said the words “let there be” and the “heavens and the earth” were created.
Yes, the Creator Logos can easily say the “word” and things were created. The truth is, He did not need anything to create something. Meaning, that the Creator did not start with “without form”/bohuw and “void”/tohuw”, not with “darkness”/choshek”(Gen. 1:2) that described something already existing prior to creation.
Also, notice that from creation, it started with “good”, not with chaos or destruction. Instead, I Tim 4:4 “For everything God created (or started) is good,…,”
That said, an original “very good/perfect” creation of “heavens and earth” in Gen. 1:1 became “without form”/bohuw and “void”/tohuw”, with “darkness”/choshek” in Gen.1:2. Could there have been a “celestial war” that caused this devastation that occurred in the time span between these 2 verses?
With this scenario, the sun, moon, stars and earth were already created in Gen. 1:1 which could be eons ago. Then in Gen. 1:2 there was this history of destruction and chaos. After that “destruction”, was “cleansing” in v-2 that started on the literal “first day” as in “And the Spirit of God moved upon the face of the waters(mayim or waste)”. The Spirit of God “cleanse the waste” and “darkness” that covered those already existing celestial bodies within that 6 day-period. The living things like plants, animals, humans were actually created on “literal” “sunset-to-sunset” days, as “very good”.
This pattern of creation was also shown in the creation of man as originally “very good/perfect”, then because of sin became “marred clay” which will be “re-conformed” (and cleansed) by the Potter (Jer.18:4; Heb 2:6; Ps.8:4) into the “likeness of Christ (Rom 8:29) to bring many sons to glory” (Heb 2:10).