After you file

start with 2021 and amend it.

then amend 2022. If you e-Filed, you should be able to e-File that amendment.

 

2023 tax return is unaffected.

 

@Happyhylian