If I have a worthless investment that I wish to write off. Do I need to sell a corresponding amount of securities to make this tax neutral for 2021?

I invested in a LLC with intent to turn it into a functioning business but it never developed.  I know I can write off the losses but it seems that I have to have a capital gain to offset the losses vs regular income.  I can sell stocks to offset the losses for capital gains but need to know if this will work prior to the actual selling of the stocks.