I now live in PA and sold my primary home in MD in 2021. I moved to PA on 1/1/2021. 1. Do I need to file a MD state tax return? ) 2. Is it subject to PA gains tax?

It qualifies for exemption to capital gains tax.