The Council of Trent
...
Celebrated on the eighth day of the month of April, in the year 1546.
The sacred and holy, ecumenical, and general Synod of Trent,--lawfully assembled in the Holy Ghost, the Same three legates of the Apostolic See presiding therein,--keeping this always in view, that, errors being removed, the purity itself of the Gospel be preserved in the Church; which (Gospel), before promised through the prophets in the holy Scriptures, our Lord Jesus Christ, the Son of God, first promulgated with His own mouth, and then commanded to be preached by His Apostles to every creature, as the fountain of all, both saving truth, and moral discipline; and seeing clearly that this truth and discipline are contained in the written books, and the unwritten traditions which, received by the Apostles from the mouth of Christ himself, or from the Apostles themselves, the Holy Ghost dictating, have come down even unto us, transmitted as it were from hand to hand; (the Synod) following the examples of the orthodox Fathers, receives and venerates with an equal affection of piety, and reverence, all the books both of the Old and of the New Testament--seeing that one God is the author of both --as also the said traditions, as well those appertaining to faith as to morals, as having been dictated, either by Christ's own word of mouth, or by the Holy Ghost, and preserved in the Catholic Church by a continuous succession.
...
To understand the Galileo affair, one has to understand the dogmas of the Council of Trent The Bible is literally authored by God himself. That means that the claims made by the magisterium of the RCC are dogmas that cannot be challenged. When Galileo challenged the science of his day, it forced him to deal with this problem. How to reconcile dogma and observations he was making.
In 1613, the Grand Duchess Christina of Florence raised the issue of Biblical dogmas that did not support heliocentrism. This prompted a friend of Galileo's Benedetto Castelli to write Galileo about the issue. Galileo replied in a letter, widely circulated that the Bible was an authority about faith, and not scientific fact. and here, Galileo ran up against dogmas set in concrete by the Council of Trent. The out was he was not to state the theory of heliocentrism as fact. The inquisition found that heliocentrism was "foolish and absurd in philosophy, and formally heretical since it explicitly contradicts in many places the sense of Holy Scripture".
Galileo realized that was indeed fact. It was therefore something that the RCC had to accept and to find a way to reconcile scientific fact with the Bible. It turned out that the RCC had no intention of doing that.
The RCC stuck with outdated and wrong science in face of facts because they had decided that they could not reconcile scientific facts developed by Galileo with the Bible. The reasons that were used to cast doubt on heliocentrism were old, wrong and obsolete, but due to theological dogmas, could not be gracefully abandoned.
We see the same dynamics with today's fundamentalist young Earth creationists. In the end, Galileo was right and the biblical based dogmas quite wrong. Since there was no way that the RCC could ban telescopes or astronomers looking through telescopes at the heavens, that was a Pyrrhic victory. The facts of heliocentrism would be well known and testable, and the biblical claims of the Council of Trent demonstrated as nonsense. Religious dogma and fact based science are sometimes a disaster.
The underlying real cause of the Galileo affair was the dogmatic statements of the Council of Trent that left the church with little room for
dealing with Galileo in a more rational fashion. It is also notable that the RCC confined Galileo to house arrest and forbade publishing any of Galileo's works, including any he might write in the future.
Better to stop the progress of science coming from Galileo than wrestle with scientific findings that called Bible revelation into question.