You can contribute and continue to fund an IRA after you retire. This applies to both Roth IRAs and traditional IRAs. Before the passage of the SECURE Act, people couldn't contribute to traditional IRAs after age 70 and a half. There were and are no age restrictions for contributing to a Roth IRA.
If you fund your IRA after you retire, you should consider the maximum contribution limits. If you exceed these limits, you will be charged a 6% penalty on the overfunded amount until it is corrected. As noted above, the IRS doesn't allow contributions to a traditional IRA after age 70 and a half, so a Roth is your only IRA option after that age. Keep in mind that those who are 70 and a half years old or older and make contributions to a traditional IRA, a SIMPLE IRA, or an SEP IRA will continue to have to apply for an RMD, even if they are still working.
Nor is there any age restriction if you are setting up a new IRA to which you will transfer or transfer assets from another IRA or from an eligible retirement plan, such as an employer-sponsored plan, such as a 401 (k).