K-1 reporting through syndication

I have a loss reported in my K-1 for the 2020 tax year. For 2021, there is income but the income does not offset all losses reported in 2020. In 2022, there is a plan to sell the syndication and I am expecting to make money. Let's say my original investment is 50k and I am getting back 100k. Can I deduct the remaining losses from the 50k I make out of this investment? I am new to syndication and trying to understand the details around tax reporting / losses.