Ibn 'Abbas (May Allah be pleased with them) said:
The Messenger of Allah (ﷺ) said, "He who acquires a branch of the knowledge of astrology, learns a branch of magic (of which he acquires more as long as) he continues to do so."[Abu Dawud]. (AR)
App reference (AR): Book 18, Hadith 161 (AR)
Arabic/English book reference (AR): Book 18, Hadith 1671 (AR)