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]. (JA)
App reference (JA): Book 18, Hadith 161 (JA)
Arabic/English book reference (JA): Book 18, Hadith 1671 (JA)