After you file

I’m sending the requested documents and then will see what comes of it. I was owed $24k by the state and now they’re asking me to pay $20k. Mind you, I even got a federal refund and owed essentially nothing to the two other states that I worked in. I only lived/worked in MD half of the year. What is the year-end paystub? Is it the last paystub received from each place that I worked even if I wasn’t still employed there at the end of the year?
This is frustrating when you pay this much to turbotax, triple review  and still get screwed without repercussions on their part.