The Social Security Administration (SSA) includes your 35 highest-earning years, adjusted for historical wage growth, in its benefit calculation. You can review your earnings history by creating an online My Social Security account .
https://www.aarp.org/retirement/social-security/benefits-calculator/