You must have taxable compensation in order to contribute to a Roth IRA.
The exception: If your spouse has earned income and you file a joint return, then you can contribute to a Roth IRA regardless of age and without earned income of your own.
https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-topics-ira-contribution-li...