You are correct…the accumulated losses on the balance sheet do expire but the rules changed in 2018. Losses incurred before 2018 have a 20 year expiration but those incurred after 2018 never expire.
Full explanation …check Investopedia…topic “Loss Carryforward”