After you file

your carryforward is entirely on Schedule D. You can submit 2022 Schedule D attached to Form 1040-X with explanation.

Note: when you are not changing any dollar amounts on your amending 1040-X, you can leave all the lines 1-23 EMPTY.

Do not include your old 1040 nor your revised 1040 because they are identical

--

your carry over propagates to 2023 tax return so you have to amend 2023 tax return also.

Your tax may change in either of the two years, which case1040-Xis not 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.

@Heredetik