NY/IL Allocation of Deferred Income

During 2019 I received 4 installments of quarterly deferred income payments from a previous Illinois employer.  All income was deferred while I lived and worked in Illinois. I was a part-year resident of Illinois and New York City during 2019 when I received the income. W-2 shows state tax withheld in both IL and NY. How do I allocate the income to state? Are both states going to tax the income? Seems like double taxation if they do, no?