Living in NYC, New York but working in New Jersey - what state taxes do I put on my W4 (state withholdings)

Hello,

I am just moved to New York City, but I work in New Jersey. For my state withholdings (W-4 I believe), should I put New Jersey or New York?

My understanding is that at the end of the year for next tax season, I would file a Non-resident New Jersey return and then a Resident New York tax return to ensure I am not taxed twice, but does it make a difference what state I am withholding taxes for on each paycheck? Do I put both states (but then I would be taxed a ton on each paycheck I believe?)

Thanks for any help / advice