Note that your 2019 W-2 shows income that was paid to you in 2019, even if some of it was for work that you did earlier. For example, if you received a paycheck in early January 2019 for time that you worked in December 2018, that's included in your 2019 W-2 because you received the payment in 2019.
And it's when you get paid not when you worked. Like if you work the last week in December you might not get paid until after Jan 1. So that payment would be on next year's 2020 W2.
So it doesn't matter when I worked it matters when I received checks?
That's right. Technically what matters is when the check was issued. If your employer issues a paycheck on December 31, 2019, but for some reason you don't pick up the check until January 2, 2020, that check will still be in your 2019 W-2.