Whats should be my filing status if i stayed in massachusetts for 20 days in 2020 and left to india after that. My family left to india on 2019 itself. am i a MA resident

I was working from home till june 2020 and got laid off due to covid. what would be my filing status for federal and state?  do i need to file it as a foreigner and non resident for MA