The question مَا بَقِيَ مِنْهَا؟ asks, “What remained of it?” In the answer مَا بَقِيَ مِنْهَا إِلَّا كَتِفُهَا, مَا is negative and إِلَّا introduces an exception: “Nothing remained except its shoulder.”
The suffix هَا in مِنْهَا refers to the sheep. The same pronoun in كَتِفُهَا means “its shoulder.” These few words offer clear beginner-level examples of negation, exception, and an attached pronoun.