Mishkat al-Masabih 97
وَعَن أبي خزامة عَن أَبِيه قَالَ سَأَلَتْ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَقُلْتُ يَا رَسُولَ اللَّهِ أَرَأَيْتَ رُقًى نَسْتَرْقِيهَا وَدَوَاءً نَتَدَاوَى بِهِ وَتُقَاةً نَتَّقِيهَا هَلْ تَرُدُّ مِنْ قَدَرِ اللَّهِ شَيْئًا قَالَ: «هِيَ مِنْ قَدَرِ الله» . رَوَاهُ أَحْمد وَالتِّرْمِذِيّ وَابْن مَاجَه
From Abu Khizamah, from his father, who said: I asked the Messenger of Allah ﷺ and said: "O Messenger of Allah, tell me about incantations we seek, medicines we treat ourselves with, and precautions we take: do they avert anything of the decree of Allah?" He said: "They are of the decree of Allah." Reported by Ahmad, at-Tirmidhi and Ibn Majah.