The Messenger of Allah ﷺ said, "Have you not considered what your Lord has said? He said, 'I do not bestow any blessing upon My servants except that a group of them wakes up denying it, saying, The stars did this, and it was by the stars.'"
قال رسول الله ﷺ: ألم تروا إلى ما قال ربكم؟ قال: ما أنعمت على عبادي من نعمة إلا أصبح فريق منهم بها كافرين يقولون: الكواكب وبالكواكب.
Muslim narrated it in Iman (72) through several routes from Yunus, from Ibn Shihab, who said, Ubaydullah bin Abdullah bin Utba narrated to me that Abu Hurairah said (then he recounted the hadith).He also narrated it through another route from Amr bin Harith, that Abu Yunus, the freed slave of Abu Hurairah, told him, from Abu Hurairah, and in it, "Allah never sends down any blessing from the sky without some group of people becoming disbelievers because of it. Allah sends down the rain, and they say, 'Such and such a star caused it.'"