Yeah...it does seem like 2 separate narratives of day 6 of creation though. Perhaps why it appears like a contradiction. I still believe God planned to make Man and Woman, just like he planned Jesus would be the lamb slain before the creation of the world. I don't know why Adam's "lonely" narrative entered into scripture at all.
Genesis 2 (Chapter 2 really should begin at 2:4 imo) is zooming in on man and giving specific details regarding the background in order to (or which lead into) the fall in chapter 3. This narrative style was practised at the time, for example there's a Sumerian stele (or Babylonian, I can't remember) which does the same thing. It gives an overview of a military campaign and then in order to go into detail it follows the same structure of Genesis where it repeats the event it's zooming in on and then proceeds to go into greater detail. The majority of these issues stem from forcing modern narrative styles and structures onto cultures that existed thousands of years ago, which many also where intended to be for oratory purposes.
Also see the Literal translation of the beginning of Gen 2:4: “These are the generations” which denotes that the next part is the succeeding or subsequent thing to flow forth from the preceding stated thing or rather takes place after the stated thing has occurred. Like a genealogy but for events. It has already presupposed creation. Genesis 2:5 takes us back to the time the author is zooming in on to provide details.
Now the main problem here which causes people to claim a contradiction or that there's 2 accounts of creation stems from assuming that genesis 2:5 excludes vegetation existing in any way. When in fact it only excludes the appearance of the "shrub of the field" & "plant of the field" and you're given the reason for those things not appearing here: "
for the LORD God had not sent rain upon the earth, and there was no man to cultivate the ground". The vegetation in question which is referenced in Gen 2:5 is not vegetation in general but that of crops and that which is gained/grown by cultivation of the ground, the distinction here is between wild vegetation & farmed/cultivated vegetation. To add to this it seems that the author is aware of the fact that other vegetation does exist during this time because in the subsequent verse he offers an explanation: "But a mist used to rise from the earth and water the whole surface of the ground".
The mist here is preceded by the conjunctive “but” which indicates how The Lord grew and sustained vegetation without the rain. The author feels the need to explain this in the verse that succeeds v.5 where we are told that there was no rain, so he is consciously aware of it or at least seems to be.
This being the case would mean that vegetation already existed at the time of the creation of man that occurs in the subsequent verse 7, but the appearance of cultivated vegetation had not yet happened because there was no rain on the earth and no man to cultivate the ground. It seems to me that while this chapter of Genesis does have creation involved (creation of man), it seems to be giving specific details regarding the background/prior events in order to (or which) lead into the fall in chapter 3. There's no reason to assume 2 creation accounts, in fact to do so would be to force a modern lens onto a foreign document which does not fit. Like a square peg into a circle hole.
I got the information regarding vegetation from a citation within InspiringPhilosphy's video on the topic at 6:32 of the video:
Now I don't really agree with the video itself (or a lot of the theology presented by him in general) but the information cited at 6:32 I think will produce the same "oh" moment in whomever is reading this regardless of your stance on textual criticism.
Re: The beginning of Gen 2:19 it's describing what has occurred
(Edit: recalling the creation of animals and then giving more detail). It's not a chronological second account of creation. It brings you back to the event of the creation in order to go into more detail, just like the vegetation above. It's not stating a separate timing of the creation. This was to be read to illiterate people and the oratory practises of the time are clearly linked to the narrative structure (which also is why there's a lot of repetitions which convey meaning & emphasis within scripture). The oratory practises are fused with the narrative pracitses. This isn't unique to Hebrew literature, this specific Hebrew literature (scripture) just happens to be 100% true.
Brother another helpful resource is InspiringPhilosphy's video documentary on the documentary hypothesis. I recommend giving it a watch, it will blow your mind as to some of the reasoning that has been accepted as consensus amongst secular & sometimes Christian academia:
Another documentary you might like that I found helpful was Pattern of Evidence's "The Moses Controversy", though it is one you have to pay for.
If about 95% of "contradictions" were presented as one author going into more detail (the gospels for example) then you wouldn't even think there was a contradiction. It's an outside force imposing the lens on which to read the text through. The other 5% I've found that cause confusion have been things like timing not being explicitly stated, language issues in English that are hard to translate, perspective issues & etc.
Brother always remember 1 Corinthians 2:14. Those who bring charges against Scripture impose their lens upon God's Word and they also do it in a way they wouldn't for anything else. You don't see anybody claiming that Marius or Sulla didn't exist or are a myth for example. This comes entirely from demonic forces inherently hostile to God which is why there's such a forceful attack on Christianity and why all other forms of heathenry are socially protected & promoted. Sorry for this mini novel but I hate it when the world pits The Word and love of Our God against His saints. It's absolutely vile.
[Edit: Sorry I just realised how that sounded. I didn't imply that's what you were doing but was speaking about the world & forces that pit God's word against His saints and creates the issues above.]
God bless
.