Part-year resident in NY and NJ, employer in NY, how should I file my tax?

Hi!

 

I lived in NY from Jan to Aug 2021 and move to NJ in Sep 2021. I worked for a company that is located in NY for the entire year. 

 

On my W2, my NY state wage is my entire year wage and they withhold the entire year NY state tax. There's a NJ state wage on my W2 but no NJ state tax was withheld on my W2. 

 

I know I am part-year resident of both states and how should I file the state tax? Can I claim credit from NJ?