There is a theme in Scripture that extends back to the earliest chapters of Genesis - that the settled life, especially in cities is spiritually dangerous, and God's people must learn to depend on Him by living a more nomadic life. Only after this learning has been accomplished do they get a city of their own. When Adam and Eve's settled life and interaction with God is broken, he sends them out into a wilderness. You can call that punishment, but one can also see it as necessary instruction.
Cain wanted to live a settled life and bring vegetables instead of meat as an offering. (I believe the meat was also considered important because of the seriousness of sin, and the slaughter of an animal is more bloody and hits closer to home than the cutting up of a brussel sprout.) God's refusal to accept this is more than just a "because I said so." It is a directive to live a particular type of life. Cain is cast out and marked, not to be killed, but to be taught to live the wandering, God-dependent life. He builds a city instead, and his line is associated with cities and violence going forward. Check out Lamech.
Seth, the third son, we don't know. But he does not seem to be associated with either agriculture or cities.
The pattern repeats. Noah is righteous and is saved from a world of corrupt cities, and after being saved what is the first thing he does? He plants a vineyard, a statement of settling down. The immediate result is drunkenness and terrible sin. This is a good place to recognise that even if these are just folk tales that God's people are telling each other, they are pretty cleverly constructed. In our era, we think "Hey, a vineyard! What a nice, earthy, peaceful thing to do!" The original hearers may have heard an opposite note: "Man! They just don't get the idea of living in dependence on God, do they?" They build a tower in a city to reach up to heaven, a symbol of man's great achievements - but God tears it down in Babel.
Abram is called out of a city, and his relatives going back into the city - Lot in particular - is always a story of temptation and sin. The Egyptian city is temporarily a salvation because of Joseph, but becomes an oppression. The rescued Hebrews have to learn wandering before they can enter cities to live in. David comes out of the countryside to be king. The City only becomes an acceptable place when it surrounds the Temple. The Jews are taken to the city of Babylon in what is called an exile. It is not seen as a leg up in the world to go to the greatest city on the planet. There is danger there.
Jesus comes first to shepherds, and the magi from Eastern cities have to get there on their own steam. Flocks good, cities bad.
Yet there is a gradual reversal, starting at the time of the First Temple, and after the lesson of learning dependence the Jews are gradually initiated into the idea that a city, under the right circumstances, might be a good thing. Or even, reading later in the New Testament, the best. For the city takes work and cooperation, trade networks and skill, technology and administration and all the works of man. James noted Charles Williams's take on the importance of the city, and its demonstration of our interdependence. No wonder the ruralist, anarcho-monarchist Tolkien disliked Williams's writing so much. Even though JRRT was Roman Catholic, he saw the rural life as more spiritually suitable, and reserved his praise of cities for future eras. Even in the NT, it is at the end of all things that the City of God comes into being.