Wait, you have several types of accounts.
1. Contributions directly to a ROTH IRA are not deducted at the time, and are withdrawn tax-free after they have been in the account for 5 years. No taxes are due. No cost basis necessary.
2. If you converted a traditional IRA to a Roth IRA, you paid taxes at the time of conversion, at your ordinary income tax rate. Future withdrawals will thus all be tax-free. (I would keep records of that tax payment at conversion.)
3. Contributions to a TRADITIONAL IRA are deducted at the time the contribution is made. But ALL withdrawals come out taxed as ordinary income in the future — so no cost basis is necessary.
4. Inherited IRAs now have new rules for distribution, depending on whether you are a spouse or an individual beneficiary. You need to keep the amount of the balance at date of death, and depending on your status as beneficiary now need to withdraw ALL the balance by the end of 10 years, instead of maybe being allowed to “stretch” it over your lifetime. But the cost of the assets inside the IRA are irrelevant to these distribution rules. That will all be taxed as ordinary income.
5. Any assets that were held OUTSIDE an IRA that you inherited get a new cost basis: the market value as of the date of death. That’s called a “step-up in basis” — and it could save the beneficiary from paying taxes if the asset had appreciated from its original cost.
In general, I keep a record of my account balances in each account — Roth and Traditional — IRAs at year-end each year. But the cost basis is not important for tax purposes in any of those accounts.
Those are the general rules. Check with your accountant or estate planning attorney for the specifics of your situation.