A bit more info would certainly help. Such as the number of speeds, short or long cage, and chainring combination.
But in general, RDs have a capacity based on two considerations. The largest sprocket they can clear, and the chain take up capacity, expressed as the sum of the differences largest to smallest, front and rear. For example, if you have 39/53 chainrings, and a 12-25 cassette you need 14+13 or 27 teeth of take up capacity.
Those capacities are listed by the maker on their spec's page. However, there's usually some fudge room, so I find I can routinely exceed them by about 10% or so.
So you can work this out for yourself, by checking system capacity and then shopping among the various cassettes to fit the system.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.