There are two different creation accounts, though they don't contradict one another. They are given from two different perspectives. The first chronologically, the second topically.
In Genesis 1, cattle comes first, then man. I assume you agree, since you say that it is chronologically correct.
Genesis 2:
"The Lord God formed man of the dust of the ground, and breathed into his nostrils the breath of life; and man became a living being."
- So Man is created.
"The Lord God planted a garden eastward in Eden, and there He put the man whom He had formed."
- Then he moved Man to the garden.
"And the Lord God commanded the man, saying, “Of every tree of the garden you may freely eat; but of the tree of the knowledge of good and evil you shall not eat, for in the day that you eat of it you shall surely die.”
- Then he tells Man to not eat from the tree.
"And the Lord God said, “It is not good that man should be alone; I will make him a helper comparable to him.” Out of the ground the Lord God formed every beast 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 each living creature, that was its name. So Adam gave names to all cattle, to the birds of the air, and to every beast of the field."
- THEN God creates cattle.
And no, he didn't really create cattle first. The narrative makes it clear that it is not until God recognizes that Adam is alone that he creates cattle, specifically to create a helper for him.
This contradiction occurs because they are two completely different stories. Different authors, different original languages. different source material. The imagery of Earth rising out of the waters (Genesis 1) came from the area around present-day Egypt where regular flooding of the Nile brought fertility to the area. The imagery of Earth being created as a series of rivers (Genesis 2) came from the area around the Tigris-Euphrates river valley (today in Iraq) where the many rivers there brought water and life to the area. One of the rivers listed is indeed the Euphrates; the name is the same today.
Different stories, different origins.
I recommend you do a little studying on this. It's a fascinating subject.