While you describe it as an auto shift problem (skips to a different gear) I suspect that it might be the more classic skipping or slipping under load problem. This is especially likely if you replaced the cassette with a used one.
Otherwise, there's the possibility that you left a slightly stiff link which is making problems when it comes around under load. Check this by back pedaling while pushing the lower pulley forward to slacken the chain's lower loop. Watch for any link that doesn't straighten immediately as the chain spools off the lower pulley.
If it isn't the chain, then a bent or misaligned hanger is the next suspect. You don't have to take it apart yet. Shift to high and stand behind the bike and eyeball whether the RD cage is vertical. Also look to see if the chain is feeding from a slightly inboard angle and touching the next larger sprocket on the way to a small one. If it is, that's your problem, pull the RD off, straighten the hanger and you should be OK.
__________________
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.