The snakes came through the camp, and many of them died.
וַיְשַׁלַּח ה' בָּעָם אֵת הַנְּחָשִׁים הַשְּׂרָפִים וַיְנַשְּׁכוּ אֶת הָעָם וַיָּמׇת עַם רָב מִיִּשְׂרָאֵל׃
במדבר כא:ו
"And Hashem sent the fiery serpents among the people, and they bit the people, and many of Israel died."
Bamidbar 21:6
The cure was the thing that was killing them, raised up where they could see it.
וַיֹּאמֶר ה' אֶל מֹשֶׁה עֲשֵׂה לְךָ שָׂרָף וְשִׂים אֹתוֹ עַל נֵס וְהָיָה כׇּל הַנָּשׁוּךְ וְרָאָה אֹתוֹ וָחָי׃
במדבר כא:ח
"And Hashem said to Moshe, make yourself a saraf and put it on a pole, and anyone who was bitten and looks at it will live."
Bamidbar 21:8
He only had to lift his head.
וַיַּעַשׂ מֹשֶׁה נְחַשׁ נְחֹשֶׁת וַיְשִׂמֵהוּ עַל הַנֵּס וְהָיָה אִם נָשַׁךְ הַנָּחָשׁ אֶת אִישׁ וְהִבִּיט אֶל נְחַשׁ הַנְּחֹשֶׁת וָחָי׃
במדבר כא:ט
"And Moshe made a copper snake and set it on the pole, and it was, if the snake had bitten a man, he would look at the copper snake and live."
Bamidbar 21:9