The prerequisites of course being in the right place at the right time, with the right people and a little luck on your side as well.
So many people are remembered just because there were first at something by like a week, and the dozen others who also thought of it elsewhere but were a bit late or didn't publicize as well are forgotten forever.
Very rarely being first counts imo. If you are building something novel in parallel there is a good chance you will have enough of difference.
Examples: other search engines, social networks, 3d games still exist. For many folks a different graphic on your homepage can be differentiator enough. (If you ever wonder why A/B, SEO, copywriting, design/ux is important)
id wasn't first in a lot of things. They were essentially porting existing graphics technology to the PC. They succeeded because other programmers turned their noses up at the "underpowered" PC in favour of systems with "better" hardware. Carmack certainly did a lot of work and devised some ingenious ways of getting the most out of PCs but he was adapting things more than pioneering them.
What did he do that was extraordinary? Was it implementing various graphical programming concepts from several papers that came out of SGI and academics? Was it cribbing another neat trick from those same people to do fast inverse square root? Was it firing Romero and releasing pretty mediocre games for 16 years as the rest of the industry made leaps of innovation in video game design that he basically ignored? Was it moving on to VR and revolutionizing that industry by.... selling an okay headset with massive subsidies and only releasing a few mediocre games that are comparable at best to garbage mobile games?
Carmack is a good coder, and has pretty good math chops. He was also cocky enough to think he could make a 486 do some of the 3D math required if they were careful and added some limitations. I don't know why anyone ascribes anything more to him. Your average data scientist produces more actual innovation than he did.
Always find the solidifying legacy as incentive weird because after you die assuming you can’t see what happens, nothing matters. Maybe so are all incentives, so whatever works for you