(Al-Ahraf) 7 : 117
وَأَوْحَيْنَا إِلَىٰ مُوسَىٰ أَنْ أَلْقِ عَصَاكَ ۖ فَإِذَا هِيَ تَلْقَفُ مَا يَأْفِكُونَ
We inspired to Moses for putting down his staff, then it swallowed up whatever they had trumped up.
Sorcery is from Satan’s side as explained in verses 2: 102 and 4: 51. So when the sorcerers put down their ropes and rods, Satan made the people believe that they are snakes. When Moses put down the staff according to the Lord’s Command, it was transformed into a snake, and by the presence of this snake, all other snakes made by Satan disappeared.