what is consider state residency? My NYS driver's license will have an out-of-state address

I'll be moving on 5/2022. I will be living in NJ for a year but plan to move back to NYC afterward. I have an NYS Driver's license with an out-of-state New Jersey address, and an NYS car registration with an NJ address, along with an NJ rent lease.

 

When filing my taxes, do I have to file taxes for NY? or would it be better just transfer my driver's license and registration completely to NJ to avoid NY altogether. My goal is to avoid paying NY/NYC tax.