Whether you have a pair of deuces or a bigger pair is important but more important is the side cards in your hand that are higher rank than your opponent’s pair. If you hold big, live side cards and also possess a small pair, you chances of winning depend on how you use the small pair side card with a big pair.
Small or medium pairs usually find themselves swimming upstream and need to pair one of those big side cards in order to win. You need to pair one these small cards with a big one like the ace or queen. You could just go for a single high pair.