Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:20:69

And throw what is in your right hand; it will swallow up what they have crafted. What they have crafted is but the trick of a magician, and the magician will not succeed wherever he is."  

And cast that which is in your right hand — and this was his staff. It shall swallow up that which they have produced. For what they have produced is only a sorcerer’s trick, that is to say, a kind thereof, and the sorcerer does not succeed wherever he may go’, in his sorcery. So Moses cast his staff and it swallowed up all of that which they ˹had˺ produced.
القرآن:٢٠:٦٩

وَأَلْقِ مَا فِي يَمِينِكَ تَلْقَفْ مَا صَنَعُوا ۖ إِنَّمَا صَنَعُوا كَيْدُ سَاحِرٍ ۖ وَلَا يُفْلِحُ السَّاحِرُ حَيْثُ أَتَىٰ  

{وألقِ ما في يمينك} وهي عصاه {تَلْقَف} تبتلع {ما صنعوا إنما صنعوا كيد ساحر} أي جنسه {ولا يفلح الساحر حيث أتى} بسحره فألقى موسى عصاه فتلقَّفت كل ما صنعوه.