It seems like there's not quite enough information in your post to troubleshoot the exact cause of the problem. Because of that, I'm going to suggest how to troubleshoot what the issue is, and adjust correctly as you go.
If this derailleur-shifter-cassette combo worked previously, then it's not a problem of compatibility, so let's assume all the parts work together when correctly installed and adjusted. NB reading through all the comments on other posts, my bet is you have a combination of improperly adjusted limit screws and some issue with the cable and/or housing. However, I think it's good to rule other possibilities out!
Ensure the derailleur hanger is straight
This usually requires a special tool. But, if your shifting was working before, and you haven't crashed or smashed your derailleur on something, this is probably not the issue.
Make sure your rear wheel is mounted correctly and that the axle is straight and correctly tightened.
Check that your cassette spins freely forward and backward, and isn't loose on the freehub
Check the range of the derailleur
- Disconnect the cable entirely from the derailleur.
- Ensure the derailleur pivots freely back and forth around the mounting bolt.
- Turn the cranks forward until the chain settles on the highest gear. If the chain is NOT settled on the highest gear, or the pulley wheels aren't lined up with the highest gear, then your outer limit screw is not in the correct position. This bolt should allow the derailleur to "relax" to the highest cog, but not pass it. Once that's adjusted...
- Press the derailleur cage slowly in toward the hub while turning the cranks. The chain should change gears as you turn, and stop on the largest cog. TAKE CARE not to press the derailleur too far and push the chain over the big cog and into your spokes! Again, make sure the chain and pulleys are lined up with the correct (biggest) cog, and if not, adjust the inner limit screw until the chain can reach the lowest gear but not pass it (though, I usually find it needs to reach a small amount past to shift smoothly-- like, half a chain width or less.)
At this point, if all has gone well, then the problem is not likely in the derailleur.
Check the cable and housing, including the ferrules
Sometimes if your cable ferrules aren't seated correctly in the frame lugs, or the housing is kinked or dented, the cable will have unexpected slack in it, or catch when you try to shift. Checking all this might require unwrapping your bars, depending on where the ends of the housing are. It's possible there's exposed cable, or a gap between the housing and a ferrule underneath the wrap.
The cable should slide freely in both directions in and out of the housing.
If the cable doesn't slide freely, replace the cable and housing, and the ferrules if any of them are damaged or dirty.
Check the shifter
At this point, it might be the shifter. Shifter internals can fail, get dirty, or the cable could be catching or be bound inside the shifter body.
Put gentle tension on the cable, and see if you have 11 "clicks" from the highest (cable furthest out) to the lowest positions. Listen and feel for any binding or skipping.
You might want to disassemble, clean, and lube the shifter internals. It's easy to lose these parts and not so easy to reassemble some shifters, so it wouldn't be my first choice.
Reconnect the cable to the derailleur
Tighten your adjustment barrel on the derailleur (and the shifter, if there is one) all the way down, and back it off a couple of full turns. This lets you adjust the cable tension in either direction and at either end if you need to later.
Make sure the cable is pulled gently all the way out and the shifter is set to the highest gear.
Make sure the cable is fed through the anchor point on the derailleur correctly. It's possible to attach this, but do it wrong, and affect the shifting.
Snug down the binding bolt.
Turning the cranks, test your shifting.
You may need to add or remove tension using the barrel adjusters to get crisp shifts from one cog to the next.
Hopefully a methodical approach like this, checking one part of the system at a time, will help you identify where the problem is in the system.
Good luck!