Married, filed federal jointly, but living in separate states for 2nd half of 2023. 2 children reside with me full time. Which residency forms are needed for NY and MD?

I lived in Maryland for the second half of 2023 but earned all my income from a NYC based company. He earned all his income in NYC and lived there for the full year.