People like Sagan have a worldview in which we are all either rational robots that only believe in "science", or else silly magic-believers that can't think by themselves. Of course Sagan himself proves that this is wrong: you can be a great scientist while believing a lot of silly nonsense about the ancient world, and about crab evolution apparently.
Believing silly nonsense which is still plausible isn't the same category of error as believing in magic.
Also I don't think skeptics hold the worldview you ascribe to them. You seem to have a particular grudge against Sagan.
A lot to unpack here. He espoused a worldview where human beings are "star stuff", a way for the Universe to be self-aware.
And this worldview does not exclude spiritual thinking, it just channels it in a specific direction.
Yes, he said our brains are made from the same matter as everything else, but it does not follow that he espoused any sort of strict materialism.
The truth is more subtle and nuanced than that.
If you are interested in getting inside his head, I recommend reading the Mr. X article.
https://marijuana-uses.com/mr-x/