The problem with science as a substitute for philosophy or for religion is the following:
1) Science was never intended to take the place of its greater discipline of philosophy;
2) Science has nothing to do with religion;
3) Science is merely a form of investigation of the physical world;
4) When people become enthralled with science, and then attempt to substitute it in their lives for philosophy or for religion, it is as if they are applying a square peg to a round hole, and doing so would be erroneous;
5) When people become entralled with religion, and then attempt to substitute it in their lives for all other thought processes, to the exclusion of philosophy and/or of science, it is as if they are applying a round peg to a square hole, which is also erroneous.
Science has its earliest roots in ancient Egypt and ancient Greece with medical specialization by the Egyptians and Greek physicians. They soon learned that by trial and error, they could identify certain cures and procedures to solve various ailments, injuries, or diseases.
Science then made great advances during the industrial revolution, when instruments, tools, and laboratory procedures became more sophisticated.
During the 20th and 21st centuries, stunning successes by scientists resulted in their adoration and enthralment by much of the public, which now gives them much more credit than even they themselves admit they are due.
Thus science for most of the amateur public has now evolved into what common peasants formerly viewed as "magic," and so the public's odd reliance on science for answers to every question, even those to which science is completely unrelated and for which science cannot devise "experiments," has resulted in the amateur public's false notion that science can tell them anything and everything.
They then fall into the formal logical trap of the fallacy of argument from ignorance, as well as the fallacy of the false authority on an issue. And after enough people are acting like fools in these manners, then the fallacy becomes an argumentum populorum, as they begin to quote each other, and say "well everyone thinks so too."
The solution to these problems lies in people gaining more knowledge.
A knowledge of the principles of philosophy is a good place to start, since philosophy deals with discussions of how human thought progresses, and what can be known, and what cannot be known, and how things are perceived.
A knowledge of the various religions on this great green planet of ours (blue in some places), and what they teach, and where and when they originated, then lends itself to an actual understanding of the different roles of science, of philosophy, and of religion.
People who mistakenly mix science, philosophy, and religion in their discussions and arguments are revealing about themselves that they have not done the complete study and thus have an incomplete (if any) education. And this is the exact definition of ignorance.
It is especially ignorant and uneducated to try to argue that science precludes religion, or that religion precludes science. As east is east, and west is west, nary these twain shall ever meet. An intelligent and well educated person will clearly understand this.
The most intelligent approach, which also demonstrates a high degree of education, is to recognize whether a question falls into one of 3 broad categories: either science related, or philosophy related, or religion related.
Matters of science can simply be answered by experimentation or trial and error. And if you cannot concieve of such an experiment, then recognize that the question is unrelated to science.
Matters of philosophy are questions or issues of how to decide something, or concerning value judgments. Is passivism preferred to activism? Is pacifism preferred to militarism? Is peace always better than war? Is war ever preferred to peace? Is it possible to know where the universe came from? Those are all matters of philosophy, and not of science or religion.
Matters of religion deal with non-physical ideas or beliefs that are broadcast by persons claiming special experiences, the kind that cannot be repeated for others in a scientific experimentation sense. Are there immortal god-like beings? Is there a supreme god? Do any or all of the popular religions of the Earth represent correctly the laws and rules of this supreme god? Will we go on living in a different sphere after we die physicaly? You cannot answer these questions with either philosophy nor with science.
It is best always to remember these 3 divisions of issues, and their infinite separation from each other.