worthless stock

Inherited stock certificates 5 years ago of a going concern. I discovered this year (2023) that the company went bankrupt 3 years ago. Question - does the "sale" have to take place in the year the stock becomes worthless (in this case 2020, the year of bankruptcy) or can I file the loss this year? As you can probably tell, I'm trying to avoid  having to file amended returns.