Chapter 2 is not a chronological account as per chapter 1.
The word 'formed' is past tense and though it was stated after mention of Adam it does not mean that they were created after Adam was created.
The following is a brief chronological overview from the bible.
GOD AND JESUS EXIST ETERNALLY.
John 1
1 In the beginning was the Word, and the Word was with God, and the Word was God.
2 He was with God in the beginning.
3 Through him all things were made; without him nothing was made that has been made.
GOD CREATED THE UNIVERSE (INCLUDING EARTH) THROUGH JESUS CHRIST IN A BEAUTIFUL CONDITION
Genesis 1
1 In the beginning God created the heavens and the earth.
WHICH CAUSED THE ANGELS TO SHOUT FOR JOY
Job 38
4 Where were you when I laid the earth's foundation?
7 while the morning stars sang together and all the angels shouted for joy?
BUT IT DID NOT STAY THAT WAY BECAUSE
Revelation 12:7
...there was war in heaven.
WHICH CAUSED THE EARTH TO BECOME
Genesis 1
2 Now the earth was [became] formless (TOHU) and empty... (TOHU - in confusion)
GOD DID NOT CREATE IT THAT WAY BECAUSE
1 Corinthians 14:33
For God is NOT the author of confusion...
SO WHEN YOU READ
Genesis 1
1 In the beginning God created the heavens and the earth.
BILLIONS OF YEARS PASSED, THEN GOD SAID
2 NOW the earth was formless and empty
AND HE PROCEEDED TO CLEAN IT UP FOR MANKIND, STARTING WITH ADAM AND EVE
THE BIBLE HAS THE INFORMATION, BUT WE NEED TO STUDY TO FIND IT
Isaiah 28
9 "Who is it he is trying to teach?...
10 For it is:
...A LITTLE HERE, A LITTLE THERE."
The 'days' of creation were not 24 hour days.
On the sixth 'day' God created all the animals - livestock and wild animals, then created Adam.
God then told Adam to name all the animals and birds.
Genesis 2
20 So the man gave names to all the livestock, the birds of the air and all the beasts of the field.
Genesis 2
20 But for Adam no suitable helper was found.
So God created Eve.
Genesis 2:23
And the man said:
This one, AT LAST, is bone of my bone,
and flesh of my flesh;
this one will be called woman,
for she was taken from man.
Genesis 1
31 And there was evening, and there was morning—the sixth day.
How could Adam have been created, say, in the morning, named all those animals and birds by, say, teatime and been desperate for a partner all in 24 hours?
ALSO:
Genesis 2
8 Now the LORD God had PLANTED A GARDEN in the east, in Eden; and there he PUT THE MAN he had formed.
9 And the LORD God MADE all kinds of TREES GROW out of the ground—TREES that were pleasing to the eye and good for food.
God planted the garden, put Adam there and made the trees grow BEFORE he created Eve.
So - no literal 24 hour days.