I believe the references provided in the comments, namely The Great Ptolemaic Smackdown and The Galileo affair: who was on the side of rationality? conflate two different issues. The validity of Galileo's scientific arguments as judged from the perch of today, and the steps Catholic Church took at the time to silence him. The former is subject to some nuance, and I addressed it in the companion post How scientifically valid were Galileo's heliocentric arguments?
The latter is much more straightforward. Catholic Church claimed authority to "censor and suppress" anything that affected "faith and morals" and these were interpreted very broadly. This authority was officially enshrined in the Council of Trent's decree explicitly invoked by Dominicans in relation to Galileo in 1614-15:
"to check unbridled spirits, [the Holy Council] decrees that no one relying on his own judgement shall, in matters of faith and morals pertaining to the edification of Christian doctrine, distorting the Scriptures in accordance with his own conceptions, presume to interpret them contrary to that sense which the holy mother Church... has held or holds..."
In 1616 the Inquisition's commission of theologians, known as qualifiers, found heliocentrism "foolish and absurd in philosophy, and formally heretical since it explicitly contradicts in many places the sense of Holy Scripture", and issued an injunction which ordered Galileo:
"to abstain completely from teaching or defending this doctrine and opinion or from discussing it... to abandon completely... the opinion that the sun stands still at the center of the world and the earth moves, and henceforth not to hold, teach, or defend it in any way whatever, either orally or in writing."
In 1633, after publishing Dialogue Concerning the Two Chief World Systems, Galileo was reminded that he was warned "if you did not acquiesce in this injunction, you should be imprisoned", ordered to "abjure, curse, and detest" heliocentric opinions, sentenced to formal imprisonment commuted to house arrest, and had Dialogue banned.
Even if Galileo's scientific arguments were completely shoddy, which they were not, this was a case of religious persecution of scientific views, for which even Vatican itself chose to officially apologize, alas only 350 years later. Against this background, the passage quoted in one of the linked posts referring to Riccioli's 1651 surmise of the debate (Galileo died in 1642) sounds almost comical:
"Seen through Riccioli's 126 arguments, the debate over the Copernican hypothesis appears dynamic and indeed similar to more modern scientific debates. Both sides present good arguments as point and counter-point."