You will enter the form W2 for the year you worked that matches the tax return year you are filing. So assuming you are completing your 2022 tax return (the current tax filing year) you would enter information from your 2022 form W2 (which you received in 2023).
If you are filing a prior year return (2021 for example) you would enter the 2021 Form W2 even though you received it in 2022.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"