Retirement tax questions

Sorry to bother you all but here's the problem.  Turbotax says, and I quote: 

Earned income does not include:
- Rental property income
- Investment income, such as interest income (reported on Form 1099-INT)
and dividend income (reported on Form 1099-DIV)
- Pension or annuity income
- Deferred compensation
- Income from a partnership for which you don't provide services
- Certain amounts that are excluded from your income, such as foreign earned income 

So it seems like line 11 is not the AGI for the purpose of "earned income" that I use for ROTH contributions. Is that right? My pension is over $100,000 so if I subtract that, the AGI is much,much smaller.  Ex. Pension $120,000 and Spouse income $17,000. The real AGI is  around $7,000 says TurboTax based on her net self employment income. so Roth contribution can only be $7,000 for her and she can't contribute anything to mine.  SO I have to take out $7,000 I contributed to my Roth in 2022.  Have I got it understood correctly?