From my perspective you are both partially correct and both partial incorrect... Yes the water on the Earth is older than the sun which is biblical. But the water that was the Sea is Genesis 1:10, if God is perfect why does he he need to create something more than once? Unless he is talking about two different things?
Direct English translation from the Hebrew:
Genesis 1:1-2 “in·beginning, Elohim (God), created, the·heavens, and, the·earth, and·the·earth, she-became, chaos, and·vacancy, and·darkness, over, surfaces-of, abyss, and·spirit-of, Elohim, vibrating, over, surfaces-of, the·waters.”
Genesis 1:6 "and·he-is-saying, Elohim, he-shall-become, atmosphere, in·midst-of, the·waters, and·he-shall-become, separating, between, waters, to·waters"
Genesis 1:9-10 "And God said, Let the waters under the heaven be gathered together unto one place, and let dry land appear and it was so. And God called the dry land Earth: and the gathering of waters he called Seas: and God saw that it was good"
I believe God is describing a sea of atoms in Genesis 1:1-2, as they are vibrating, vast, and abyss. The depth of the whole of the Universe filled with all atoms or matter until God starts to mold the universe (Second day of creation, logical).
I believe the separation of"waters" in Genesis 1:6 is the description of Gravity, (separates gases/liquids/solids) which creates atmosphere. How can you have an Earth prior to Genesis 1:6 if there is no atmosphere (no gravity)? This is the second "day" of creation.
Genesis 1:9-10 is the actual Earth and Seas... named properly by God. Again the bible does not support a 24hr. day! At best you could state the second "day" of creation if you invoke the Shekinah Glory of God, if you can forgo the logic problem of the first "day" of creation. The second problem is that the sun and stars are not created until the 4th "day" of creation. So what then is the first "day" of creation describing as time?
As for the creating of our sun and its planets there are two well regarded scientific theories/models on this topic. Both have tremendous flaws. The first makes it impossible for the creation of any moons not just the moon of Earth. The second accounts for moons but does not allow for any gas giant planets. The problems therefore are obvious and there is a long way to go for either to be reasonably accurate, as long as scientist ignore the possibility that planets can form without a sun.
Google "rogue planets" and you will get quite a few that have been discovered, that should not be possible with man's current understanding of cosmology.
If you agree with current science dating than the Earths water is older than the sun and it is accorded in the Bible. If you agree with the Bible you cannot state that the water in Genesis 1:1-2 is the Sea, as God does not name the Sea until the next "day" in creation. Land and Seas cannot form without Gravity, and gravity needs atoms on which to act... logical. If the Sea's are not named by God until the 2 day of creation, what is all the "water" describing previous to this?
Warm regards, GBTG