There are a lot of factors and many of them can't be measured simply.
Luck: They got hired at "just the right moment in just the right place"
Drive: Some people give up "life" for constant striving in research or whatever led to their success.
People: The managed to join or put together a productive circle of collaborators.
Personality: Others were happy to boost them and there was mutual admiration.
Luck again: They just happened into a hot area at the moment and made the most of it.
Luck again: They publish a paper that just happens to be seminal for the understanding of some important subfield, perhaps newly important.
Sharing: They weren't selfish about things, talked to a lot of people and shared a lot of ideas.
Speaking: They got heavily involved in conferences as speakers and eventually as committee.
Since you mention CS, I could probably name names for most of these aspects. Some designed languages that became important. Some designed various techniques, say in algorithmics or software engineering.