I worked part-year for a Texas company and NY company in 2021 but live full-time in Texas. Why is New York taxing my income earned in Texas if I'm a non-resident?

When I entered the W-2 for the NY company in TT, it showed a state refund. But when I added the Texas W-2, it showed I owed NY state tax. How did it go from green to red by adding non-NY income?