IRA Cost Basis

I made nondeductible investments into my IRA.  If I had known about the extra hassle, I would not have made the investments. Anyway, I have my cost basis, and TurboTax carried the balance to this year's tax form. I entered my RMD income amount and my tax amount due was calculated. After I verified my carrier over basis was correct, I entered my 12/31/22 IRA balance. I expected the tax balance due to go down as I wouldn't pay tax on the nontaxable amount but when the tax was recalculated, the tax due went up by 37%. It doesn't make any sense to me. By entering the nod deductible tax basis my taxes went up. Can anyone explain this to me? Thanks