It was narrated from Ibn Abbas that the Messenger of Allah(ﷺ) said:"Whoever learns about the stars, he learns a branch of magic; the more he learns (of the former) the more he learns (of the latter)
Hadith No. 3726
Sunan Ibn Majah
Gradings:
Al-Albani:
Hasan
Muhammad Fouad Abd al-Baqi:
Hasan
Zubair Ali Zai:
Isnaad Hasan