The first permanent settlement we currently know of was Dolní Věstonice, settled about 25,000 years ago. Homo sapiens appeared about 300,000 years ago, so there’s about 275,000 years of being nomadic or semi-nomadic.
The main technological breakthrough that made permanent settlement popular- and enabled cities later on- was agriculture. Being able to cultivate certain plants that a community could rely on producing nutritious parts on a regular and predictable yearly cycles allowed people to stay in one place and produce enough food to reliably feed a lot of people. But early settlements didn’t have farms- they lived close to populations of mammoths (in the above case) or other fauna that they could hunt reliably, and there was enough edible plants in the area that they knew of that they could gather from. So for the most part it was just hunting technology and an opportune place to stay that enabled the first permanent settlements.
Latest Answers