State Taxes

I worked the full 2023 year in PA but had to travel for work to IL & MD for ~1-2 weeks each. The company withheld taxes for those states - do I need to file taxes for those states? Can I get a reimbursement if they have a reciprocal agreement with PA?