I wanted to ask about filing state taxes. I work for employer in NJ but I lived in NY and I moved to AL during the year... do I need to file taxes for all the states?

Also, how long do I need to have stayed on NY to need to file NY state taxes? I was there for less than a month in 2020 before I moved to AL