If your domicile - your main, primary home - was in another state prior to 3/31, then yes, you have to claim it. For tax purposes you are a part-year resident of each of the two states for 2023.
**Answers are correct to the best of my ability but do not constitute tax or legal advice.