Man, this question really depends on which kind of elf city we're talking about. There's a huge difference between the high fantasy 'noble guardians of the forest' types and the more modern, gritty takes. I'm mainly familiar with older, Tolkien-esque settings, so bear with me.
In the classic model, it's all about age and purity of bloodline. The oldest families, who can trace their lineage back to the first awakenings or some mythical founder, sit at the top. They're not just nobles; they're living historians, their memories forming the law and tradition. Beneath them are the artisans, scholars, and mages—valued for their craft and knowledge, but still seen as younger branches of the great tree. Then you've got the 'common' elves, who handle the day-to-day cultivation, hunting, and crafting that aren't considered 'high arts.'
The weird part, and what a lot of stories gloss over, is that there's almost always a lower tier of non-elves or 'half-elves' living in the city's periphery. They do the work deemed too mundane or 'earthy' for full elves, like serious metal-smithing involving lots of fire, or trade with human kingdoms. Their presence is tolerated but they're never truly part of the social fabric. It's a hierarchy built on memory, aesthetics, and a quiet, unshakable belief in elven superiority.
You see this play out in daily rituals—who gets to speak first in council, who walks in which garden precincts, even the complexity of the leaf patterns on their clothing. It's all coded.