Lived part year in one state and then moved to another and still work in the first state. State tax returns

I work in Delaware. In 2022 I lived in Delaware for 8 months and then moved to PA for 4 months of the year and still work in Delaware. I am not sure how to file the state tax return. Do I have to file a state return in both states?