Lived in 3 states in 2024

I lived in 3 states in 2024: NY (NYC for 6 months), FL (3 months while still working for an NYC based company), NC (3 months).  How does this work filing wise? Do I file in all 3 states? What is my residency status in each state? I think I would be an NYC resident for the first half of the year, but not sure how the second half works or I'm even correct in my thinking for the first half. 

 

Thank you in advance for the guidance!