ChatGPT's answer
To contribute to a Roth IRA, you need to have earned income from employment or self-employment. Earned income includes wages, salaries, tips, commissions, and self-employment income.
Investment income such as dividends, interest, and capital gains do not count as earned income for the purpose of contributing to a Roth IRA. Additionally, income from rental properties or passive activities does not count as earned income unless you are actively involved in managing the property or activity.