This What is the Authoritative Catholic Explanation of why the Magi get a pass, yet Catholics are to reject Astrology?, seems to be related to this question.
God Has Spoken by His Son Hebrews 1:1-4
1 In many and various ways God spoke of old to our fathers by the
prophets; 2 but in these last days he has spoken to us by a Son, whom
he appointed the heir of all things, through whom also he created the
world. 3 He reflects the glory of God and bears the very stamp of his
nature, upholding the universe by his word of power. When he had made
purification for sins, he sat down at the right hand of the Majesty on
high, 4 having become as much superior to angels as the name he has
obtained is more excellent than theirs.
If there is True Religion [and there is since there is the One, True God], it seems that there must a graduation from 'no religion' (doubt there is such a thing) to the one , true Religion, from bad and corrupt religion to the good religion. Compare with good science vs. bad science. I do not know what the total process was when the Amerindians cured Malaria with quinine. In addition to administering the medicine, perhaps there was some superstitious ceremony involved.
I do believe that there is science in the stars, that there are signs to be read there as per Genesis 1:14-16 (RSVCE). My take is that it belongs to the primitive religion, perhaps the religion Man practiced after expulsion from Gan Eden, perhaps a religion revealed by the angels but apt to corruption since there are competing angels (good vs. fallen; fallen vs. fallen). Scripture seems to suggest a connection between angels and stars.
The prohibition in Israel and the Church can then be explained this way: if one has the superior, purer religion, why dabble in the primitive one admixed with superstition that may lead one astray?
This is what contributed to my thinking:
When the Egyptian pagan priests intended to read the stars, they
fasted as a preparation, performed certain purifications, clothed
themselves in sackcloth, and sprinkled themselves with ashes. While
they gazed upon the stars from their tower, sacrifices were offered.
The pagans of those times had a confused knowledge of the religious
mysteries of the true God which had been handed down from Seth,
Henoch, Noe, and the Patriarchs to the chosen people, therefore there
were so many abominations in their idolatry. The devil made use of
them, as later on of heresy, to weave the pure, unclouded, authentic
revelations of God into a snare for man's destruction. Joseph and
Aseneth | The Life of Jesus Christ and Biblical Revelations | Anne
and an excerpt from Angels | New Advent:
And it is not a little remarkable that only two verses later he warns
his readers not to be seduced into any "religion of angels". He
seems to put his seal upon a certain lawful angelology, and at the
same time to warn them against indulging superstition on the
subject. We have a hint of such excesses in the Book of Enoch,
wherein, as already stated, the angels play a quite disproportionate
part. Similarly Josephus tells us (Bel. Jud., II, viii, 7) that the
Essenes had to take a vow to preserve the names of the angels.