Let's examine the two texts to which you refer:
Therefore the people came to Moses, and said, "We have sinned, for we have spoken against the LORD and against you; pray to the LORD that He take away the serpents from us."Jesus being lifted up refers to His hanging and dying on the cross. It does seem odd that Jesus would be compared to a serpent while hanging on the cross.
So Moses prayed for the people. Then the LORD said to Moses, "Make a fiery serpent, and set it on a pole; and it shall be that everyone who is bitten, when he looks at it, shall live." So Moses made a bronze serpent, and put it on a pole; and so it was, if a serpent had bitten anyone, when he looked at the bronze serpent, he lived.
(Num. 21:7-9 NKJ)
And as Moses lifted up the serpent in the wilderness, even so must the Son of Man be lifted up, that whoever believes in Him should not perish but have eternal life.
For God so loved the world that He gave His one and only Son, that whoever believes in Him shall not perish but have eternal life.
(John 3:14-16 NKJ)
In order to understand this, you simply have to realize that Jesus took the sin of the whole world on Himself and we can be freed and forgiven of our sins if we believe on Him (read Isaiah 53:5-6 and 2 Corinthians 5:21).
All rights reserved. Used by permission.