What does Genesis 2:4 mean?
Chapter 1 described God's process of creation in six separate days. The first few verses of chapter 2 complete that sequence with a seventh day, where God takes a deliberate rest from His work. Having concluded the account of the creation week, Genesis now turns back to provide more detail about the creation of human beings, where they lived, and God's instructions to them.This verse serves as an introduction to the story of Adam and Eve and those who would follow. It is written in the poetic structure of a "chiasm." This is a word-pyramid in which phrases parallel each other on the way "up" and "down." Another way to think of this is as a mirror, centered on some specific point. The idea-pattern in a chiasm is structured as A-B-C-B-A, but can include many more points around the central theme. This form of writing is common throughout Genesis.
So this verse begins with "This is the account ['these are the generations'] of the heavens and the earth when they were created." And then it reverses direction: "'When the Lord made the earth and the heavens.' "
This pattern can be found in Genesis in single verses, in multi-verse sections, and even over the course of multiple chapters.