This is something I been thinking about, and sort of throwing out it here.
Many human societies are extremely, and indigenous can be as complex as with how rules/laws are managed in societies. Now a common type of inequality that is often mentioned is about resource type inequality like food, water, and many other things human need to live, but the first inequality was that made elites could of been from who controls, and pass down ritual knowledge.
Finally, and most provocatively, the widespread cultural transmission of ritual creates a different kind of elite: An epistemic elite regarded as possessing esoteric knowledge of the supernatural and trusted with leading group-wide rituals. This enables mutually beneficial alliances to form between the epistemic and material elites: Shamans, in return for material privileges of their own, purport to reveal hidden truths favorable to the continuation of the unequal social order. “The ritual and religious lives of these transegalitarian communities became channels through which the community is half persuaded, half coerced into accepting the new status quo” (p. 145). Religion, on this account, is the handmaiden of inequality, hierarchy, and living in shit.
Societies that are either matrilineal, or patrilineal are kin type society have a system where inequality could slowly form over time depending of the complexity on how belonging are passed down, leadership, and rituals knowledge .
“the competitive and fraught relations between communities (and hence the advantage of signaling one's wealth, strength and allies) opens this door to aggrandizers to turn wealth into political leadership, and leadership into wealth” (Sterelny, 2021, p. 139). Clan-like organization, in which patrilineal (or, in some cases, matrilineal) kin groups have strong obligations to assist each other despite geographic separation, creates networks that “enable would-be aggrandizers to recruit social and material support, and through which that support could be rewarded” (p. 151).
NOTE: this my opinion I posted some things supporting things are similar to my theory if your interested.