If you look at both sections of scripture, you'll notice that in Genesis 1, it has a chronological order of creation.
In the 2nd chapter of Genesis, you'll note it isn't the creation of all things, no mention of the stars, planets or even fish are spoken of. More so, you'll note starting in verse 5, that the word for plants is actually different than the word used for plants in Genesis 1. I am quoting from Amplified, as it makes it more clear that the type of plants that the scholards and historians consider the correct use. It refers to the plants of the field. Crop land, farm land.
You'll see many references to the garden of Eden having plants that are good to eat, and need to be worked by man. (no man to till the land) Simply put, the type of farmland plants in the Garden of Eden were pointed out that they were waiting to grow for man to come and work them.
Note, that animals being formed in the garden of Eden does not mean they were created only on that day. It makes no mention of the fish for example. Considering that the creation is not a complete creation, (Example, no mention of Earth, stars, heavens, day, night, or fish, it would not be considered a conflict to the previous account from chapter 1. )
And considering that Chapter 2 naturally follows chapter 1, it seems reasonable that the author did not forget what happened on days 1-5, but focused on the events in the Garden of Eden with man.
Bible amplified:
5 When no plant of the field was yet in the earth and no herb of the field had yet sprung up, for the Lord God had not [yet] caused it to rain upon the earth and there was no man to till the ground,
6 But there went up a mist (fog, vapor) from the land and watered the whole surface of the ground—
7 Then the Lord God formed man from the [a]dust of the ground and breathed into his nostrils the breath or spirit of life, and man became a living being.
8 And the Lord God planted a garden toward the east, in Eden [delight]; and there He put the man whom He had formed (framed, constituted).
9 And out of the ground the Lord God made to grow every tree that is pleasant to the sight or to be desired—good (suitable, pleasant) for food; the tree of life also in the center of the garden, and the tree of the knowledge of [the difference between] good and evil and blessing and calamity.
10 Now a river went out of Eden to water the garden; and from there it divided and became four [river] heads.
11 The first is named Pishon; it is the one flowing around the whole land of Havilah, where there is gold.
12 The gold of that land is of high quality; bdellium (pearl?) and onyx stone are there.
13 The second river is named Gihon; it is the one flowing around the whole land of Cush.
14 The third river is named Hiddekel [the Tigris]; it is the one flowing east of Assyria. And the fourth river is the Euphrates.
15 And the Lord God took the man and put him in the Garden of Eden to tend and guard and keep it.
16 And the Lord God commanded the man, saying, You may freely eat of every tree of the garden;
17 But of the tree of the knowledge of good and evil and blessing and calamity you shall not eat, for in the day that you eat of it you shall surely die.
18 Now the Lord God said, It is not good (sufficient, satisfactory) that the man should be alone; I will make him a helper (suitable, adapted, complementary) for him.
19 And out of the ground the Lord God formed every [wild] beast and living creature of the field and every bird of the air and brought them to Adam to see what he would call them; and whatever Adam called every living creature, that was its name.