If your return has been filed and you were notified that it was accepted by the IRS, you will have to amend your return using Form 1040-X. If your return is rejected for some reason, you will be able to fix the error and use the correct W-2 for the tax year 2021.
Form 1040-X is not ready from the IRS to use to amend your return. Here is a link to use when the form is ready.
You can check the availability of the form here.