But is this reality or just a nice narrative people like to bring up as a "all experts are wrong" dog whistle?
The Galileo thing was about politics, not religion. The pope (who was a good friend of his) gave him permission to write and publish the book, and then Galileo used an exact quote from that friend as a line from a character called "Simplicio" and it turns out spitting in your friend's face when the rest of the elites already hate you is a great way to be censured in a time before "knowledge is power".
It also wasn't scientific.