Humanity did not begin thinking with the invention of writing. Actually humans were able to think as long ago as 100,000 B.C.E. Besides inventing spears they may have invented thought with recurrent word patterns and phrases, for they were able to think with more than onomatopoeic grunts. Things like “you put the lime in the coconut, mix them both up, put the lime in the coconut, drink them together”…repeat. Early recurrent or rhyming phrases could be as old as art. Apparently recent discoveries have been made that indicate Neanderthals may have painted cave art too.
There were oral traditions in numerous cultures (notably Semitic) of keeping history in something like verse because that is easier to remember and probably preceded the invention of writing. Arabs were keeping such histories unto the time of Mohammed. British bards wondered about with historic, entertaining neo-truths for performance long before literacy became ubiquitous At least one prisoner in the Soviet Gulag used the same method according to Solzhenitsyn, writing thousands of lines with clever first letter in order line keys to help recall the content.
Those first letter keys are considered acrostics and have occurred at least as early as the court of Solomon in the 10th century B.C. Acrostics in the Hebrew Bible The verses of proverbs may be regarded as actual poetry. Maybe Solomon was the first literary poet, Oral poetry would have found the use of clever poetic feet challenging, and thus it is slow to appear in history and is found first in the Hebrew Bible perhaps, and later is developed more fully with the ancient Greek poets.
Enheduanna of the ancient civilization of Sumer is sometimes credited with being the first poet because the Sumerians invented writing circa the 30th century B.C.E. (although I seem to recall reading somewhere that fragments of the Gilgamesh epic were dated to the 4th century B.C.E. and maybe the 5th). She wrote hymns to a pagan deity. Sumerians were able to write on clay tablets for posterity.
The wikipedia article on Sumerian literature leaves the verdict on Sumerian poetry open; there isn’t enough evidence to form an open on the hymns of Erheduanna or other Sumerians being verse and poetry though they might have been couplets etc.
“Most Sumerian literature is written in left-justified lines, and could contain line-based organization such as the couplet or the stanza, but the Sumerian definition of poetry is unknown. It is not rhymed, although “comparable effects were sometimes exploited.” It did not use syllabo-tonic versification, and the writing system precludes detection of rhythm, metre, rhyme, or alliteration. Quantitative analysis of other possible poetic features seems to be lacking, or has been intentionally hidden by the scribes who recorded the writing.”
King David of Israel wrote the psalms that were in verse somewhat earlier than the Greek poets circa 1000 B.C.E. In Hebrew the form was couplets and triplets.
The Homeric poets were of the 3th century B.C.E. They wrote in dactylic pentameter. Hesiod was around that era and the first well-known woman poet of Greece named Sappho used a different meter, an Aeolic verse form called eponymously the Sapphic stanza in the 7th-6th centuries. Early Greek Poets Timeline