1.Trade and Military Alliances, Plains Indians example
Your question is actually pretty important not just for Worldbuilding. The Plains Indians were occasional trade and military allies of the settlers, although this may have lead gradually (over a 300 year period) to the worst case outcome for them.
During the early stages of colonization post 1650 the Plains Indians had resources and knowledge that the European groups wanted to trade for their goods, while horses were imported from the Old world in around 1700, they became very skilled riders, they understood the land they were living in, the seasons, the flora and fauna, the waterways, and so forth. They followed the migrations of animals, for example, the bison. They traded bison, elk and beaver pelts and pemmican (bison) meat for iron goods such as pots, hatchets, pans, knives, utensils, arrows, muskets, textiles such as wool blankets, and food such as corn and beans. The Hudson Bay company and North West Company in Canada, and The American Fur Company, established posts at the forks of rivers, and the relationship between the indians and the settlers was not always in direct conflict, as trade occurred. Some of these outposts were large forts, and some of them were not. The peace was unstable and volatile, not only among the settlers but among the various indigenous tribes, who in some cases did not share languages or culture. For example, there was a conflict between Cree and Blackfoot,before they made peace in 1873. The trade also conferred possible advantages to one tribe over another. If you are the enemy of my enemy...
In Canada, the Iron confederacy (Cree and Assiniboine) seemed to decline partly because of the population of bison being depleted and smallpox brought by the colonizers.
Different nations of the colonizers, such as the French, the British Loyalists, and the American revolutionaries on the US side of the border became allies of different tribes. This also affected the treaties they signed. Over a 200 or 300 year period, the Europeans negotiated a series of agreements and treaties, only a small number of which were actually honoured fully.
You might be inclined to say- there are a lot of other reasons the Plains Indians didn't overwhelm the settlers. The main reason was because they had guns. Yes, it was a factor, and I agree, it was one among many. Jared Diamond in his excellent book "Guns, Germs, and Steel", adds a few other vectors such as viruses and agriculture crop packages that lead to larger populations than tribal cultures.
I think that the history of Fort Garry or Winnipeg, Canada might be a example of what i am talking about. The city was built on a site that the indigenous knew about already, the colonizers took this meeting place, and made it a trading post. This is an example of using indigenous knowledge as a guide for understanding geography.
There were conflicts with the tribes, but there were also conflicts between trading companies, and different tribes backed sides in the conflict, much as tribes did with English and French, or English and American conflicts. Over time agreements were made with the native people that were not favourable to them. This article points out that their chiefs were not always naive to this. Further as the bison depleted, which was one of their main trading goods to get for the European ones, the situation of the indigenous worsened. An interesting thing is that there were mixed race individuals, Metis- who also became a group in the area, and later staged a rebellion.
The genocide of indigenous peoples is well documented, (see the Truth and Reconciliation report if you want to study it seriously) and part of the systemic approach involved the government making false agreements, religious indoctrination, and re-education to eliminate indigenous culture. As I said, this is an important and serious question. History is complex.
A last note, As others have pointed out, once the nomad succeeds in taking the city, they are faced with the question: "Will you become a city dweller?" Poetically, at least, they may not want to. Yuval Harrari in his course on Sapiens argued that though cities support more people, the agricultural revolution took a long time to lead to better conditions for each individual- due to population density. If you are accustomed to living outside in Nature-and your culture and tradition is built over years of oral tradition, Who wants to be cramped in a city when you can have the whole sky as your ceiling?
2.Going Back to World Building
Ultimately, I think it is more interesting to focus on dynamics between factions rather than their military forces. Treaties are not signed by walls.
You might have a history where the beginning of the relationship involves a trading relation ship between a minority power city, and a majority power nomad group, but as the city has expanded the relationship has become strained, and more conflicts among the two factions are apparent. The city now far outnumbers the nomads and consumes more resources. It's population is now 10 x the size of the nomads, and has defeated them in every major skirmish with a standing army and reserves that have superior weaponry and even signed some treaty agreements.Among the nomads, the clans that supported the city have been rewarded and promoted. On the other hand, the clans that haven't supported the city have been defeated or driven away, ceding their territory to the city. The nomads who sided with the city have also bought more expensive weapons, horses, and other commodities as status symbols. A treaty has been signed to allow the nomadic clans to be autonomous in their territory as long as they lend their arms to the city against incursions by foreign powers. One problem though, the traditional Nomad way of life is dying out.
Your question required the nomads and the city dwellers to be same ethnic origin. Yet It also mentioned the nomads were like Plains Indians in terms of their organizational structure, I wanted to write a thoughtful answer about why the Plains Indians were overcome by city dwellers, why it is a complex scenario, and also why examining it in detail has value for world building.
Sources:
1.https://en.wikipedia.org/wiki/History_of_Winnipeg
2.https://www.thecanadianencyclopedia.ca/en/article/buffalo-hunt
3.https://www.britannica.com/topic/Native-American/The-American-Revolution-1775-83
4.https://www.battlefields.org/learn/articles/native-american-impact-british-war-strategy-southern-campaign