"And as Moses lifted up the serpent in the wilderness, even so must the Son of man be lifted up: That whosoever believeth in him should not perish, but have eternal life" (John 3:14-15).
The occasion in the life of Moses referred to here by Jesus can be read of in Numbers 21. Israel had sinned against the Lord and judgment followed. "And the LORD sent fiery serpents among the people, and they bit the people; and much people of Israel died" (Numbers 21:6). This is just one of the many specific instances of sin recorded in the Bible so we who would come after could learn the ways of the Lord and the dangers of sin. Sin brings the deadly bite of the serpent.
When the people under conviction cried, "we have sinned", God provided a way of escape. "And the LORD said unto Moses, Make thee a fiery serpent, and set it upon a pole: and it shall come to pass, that every one that is bitten, when he looketh upon it, shall live" (Numbers 21:8).
The serpent of brass mirrored the death sentence Israel experienced by the fiery serpents, but lifted up on a pole it was an offer of life for all that were bitten. Jesus referred to this to teach Nicodemus of God's provision for eternal salvation soon to take place. Jesus had to be lifted up on a cross and experience the curse against sin, the death penalty. Though He had never sinned, the Saviour had to die. He "must" be lifted up.
The snake-bitten, guilty, dying men of Israel could only have physical life restored by looking at the brass serpent lifted up. And Nicodemus (or you or I) can only have eternal salvation by a look of faith toward the Lord Jesus Christ in His substitutionary death on the cross (believe). Nicodemus had first just wanted the faith of the scholar, the seminary student. "The same came to Jesus by night, and said unto him, Rabbi, we know that thou art a teacher come from God: for no man can do these miracles that thou doest, except God be with him" (John 3:2). But the faith that saves is the one that looks to God's Son dying on the cross for salvation like the guilty snake-bitten sinners of Numbers 21