Get your taxes done using TurboTax

I have IRA distribution, is $48,000 in 2020,  capital gain is $6,000, so I need pay some tax for the income. I want to know the carryover capital loss from previous year (2019) can offset which portion of my income? Because I want to contribute max amount to my HSA.

As I know, the carryover loss can can be deducted from my income even there is no capital gain, am I correct?