Assuming you did everything else correctly (including adjusting the cable and limit screws, and using a longer chain for that bigger cog while not exceeding the derailleur's max wrap), I'd place a wager on a bent derailleur hanger.
__________________
It's like riding a bicycle