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:21:3

With their hearts distracted. And those who do wrong conceal their private conversation, ˹saying˺, "Is this ˹Prophet˺ except a human being like you? So would you approach magic while you are aware ˹of it˺?"  

with their hearts preoccupied, heedless of its meanings. And they are secret in ˹their˺ conference, ˹their˺ speech, ˹they˺ the evildoers (alladhīna zalamū, a substitution for the ˹third person plural indicator˺ wāw of wa-asarrū’l-najwā, ‘and they are secret in conference’) ‘Is this, namely, Muhammad (s), other than a ˹mortal˺ human being like yourselves?, and so what he produces is ˹mere˺ sorcery. Will you then take ˹to˺ sorcery, ˹will˺ you ˹succumb and˺ follow it, even though you are able to see?’, ˹even though˺ you know that it is sorcery?
القرآن:٢١:٣

لَاهِيَةً قُلُوبُهُمْ ۗ وَأَسَرُّوا النَّجْوَى الَّذِينَ ظَلَمُوا هَلْ هَٰذَا إِلَّا بَشَرٌ مِثْلُكُمْ ۖ أَفَتَأْتُونَ السِّحْرَ وَأَنْتُمْ تُبْصِرُونَ  

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