The Roman historian Titus Livius (Livy's History of Rome (and various other names)) roughly covered how it worked from the founding through until 293 BC and from 219 to 166 BC.
The periods 293 through 219 BC and 166 to 9 BC are vague because of missing Livy volumes and lesser (or no) alternative sources for those ranges.
Aside from age, being a (primary major family) Patrician was a factor for some of the Roman Kingdom, at other times the pool expanded to include minor Patrician families. During the Kingdom the Senate largely worked as an advisory council to the king, grinding through legislative details, and more or less being responsible for the election of new kings (variously with or without input from "the people").
The current consensus is that Livy only had a very vague understanding of the early republic let alone the royal period since his narrative frequently conflicts with archeological evidence and other sources. Basically he was constantly projecting the late republican system onto much older periods and implying it barely developed or changed over the years while there is strong evidence to the contrary.
> Patrician was a factor
We don’t really understand the patrician vs plebeian split and how it functioned before or during the founding of the republic. Again there is evidence it was only fully established decades later.