My anecdotal example that I don't know anyone who made massive/post-economic money by joining a public company. You can probably make six figures easily, and potentially low 7 figures in some years. The only people I know who have mode 8 or 9 figures are people who have joined startups early or relatively early before the IPO, and the startup became a $20-100B company.
Seed stage, as one of the first senior engineers, you might get 2%-0.5% equity. At $20M valuation (common YC valuation at the moment). That's $400k-100k value vesting over 4 years (which might sound low compared to FAANG offers). The point is the upside potential, not the value. FAANG companies might grow 5x in 5 years. Startups can grow much more. That's why the whole VC market exists.
Hitting $1B means the company valuation went up 50x, hitting $10B means 500x, hitting $100B means 5000x. So your initial offer could be worth several millions to hundreds of millions. Even if you join later, when the company is valued $500M-$1B, you might still get 50-100x upside.
The math is more complicated since usually companies raise multiple rounds which then dilutes the existing shareholders. Roughly 20% at seed/series a, and then less after that.