Wa `alaykum as-salam wa rahmatullahi wa barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Brother, thanks for your good question. May Allah Almighty protect us all against all evils and harms.
Magic is a fact that is mentioned in the Qur'an, and there is nothing wrong to believe that it has harmful effects if Allah so wills. Nothing can harm a person or benefit him or her except with the will of Almighty Allah.
Responding to the question, Dr. SalahSultan, president of the American Center for Islamic Research, Columbus, Ohio , and Member of the European Council for Fatwa and Research, states,
Magic certainly harms people by the will of Almighty Allah who confirms this fact in the Qur’an, "‘But they could not thus harm anyone except by Allah's permission.” (Al-Baqarah 2:102)
Therefore, there is nothing wrong in believing that magic does harm people by the will of Almighty Allah.
Magic can not be used for a good cause, unless it is used, as a last resort, to remove some of its effects from a person who is suffering from a magic spell.
However, I advise everyone to use the authentic ruqyah instead, as it is enough and in conformity with the Prophet’s Sunnah.