Deductions & credits

In your situation, I would amend only 2022 tax return showing correct carry forward from 2021. resulting in correct carry forward for 2023..

Note that you lose $3,000 of carry forward each year whether you  use it or not.

But, your carryforward is going up not down because losses were more than $3,000 per year.

--

get Form 1040-X from IRS website and mail it in with your corrected Schedule D, which you can also get in fillable PDF.
Note: when you are not changing any dollar amounts on your 1040-X, you can leave all the lines 1-23 EMPTY.

 

Do not include your old 1040 nor your revised 1040 because the Form 1040-X reflects any changes there and becomes your new tax return.

@swapd29