The Prophet ﷺ permitted ruqyah that does not contain shirk.
Auf b. Malik Ashja'i reported We practised incantation in the pre-Islamic days and we said:Allah's Messenger. what is your opinion about it? He said: Let me know your incantation and said: There is no harm in the incantation which does not smack of polytheism
العربية
حَدَّثَنِي أَبُو الطَّاهِرِ، أَخْبَرَنَا ابْنُ وَهْبٍ، أَخْبَرَنِي مُعَاوِيَةُ بْنُ صَالِحٍ، عَنْ عَبْدِ الرَّحْمَنِ، بْنِ جُبَيْرٍ عَنْ أَبِيهِ، عَنْ عَوْفِ بْنِ مَالِكٍ الأَشْجَعِيِّ، قَالَ كُنَّا نَرْقِي فِي الْجَاهِلِيَّةِ فَقُلْنَا يَا رَسُولَ اللَّهِ كَيْفَ تَرَى فِي ذَلِكَ فَقَالَ " اعْرِضُوا عَلَىَّ رُقَاكُمْ لاَ بَأْسَ بِالرُّقَى مَا لَمْ يَكُنْ فِيهِ شِرْكٌ " .