Beer is older- by about another 5000 years. It’s also easier to produce. The impetus to found settlements and maintain a stockpile of grain was partially influenced by the fondness for beer according to some archaeologists. Beer was important nutritionally as well. In addition to its intoxicating effects it was literally “bread in a glass (or cup)” A source of both food and potable water.
CC
Noah planted the first post flood vineyard, so wine is older than beer (at least since the Great Flood).
Both were probably discovered by accident, or more accurately, happy accident. And the birth rates probably went way up right after that. ;’)