This question seems to be premised on the concept that religion is a way of coming up with mythological answers to questions that we don't have the science to figure out yet. This unfortunate notion has been around for a long time, but there's actually very little truth to it. It's been debunked over and over by actual scholars and historians, including on this very site, but unfortunately it's a notion that just won't die. And even more unfortunately, it obscures the true value of religion throughout history, whether one is a believer or not: religion comprises the mechanism for long-term storage and preservation of the sum total of the lab notes of the science of human behavior throughout history!
People have understood the basic idea of cause and effect for as long as there were any people capable of understanding anything. When cause and effect are so close together in time that the relationship is obvious, it's no big deal to understand it. But the longer the time gap between the cause and the manifestation of a visible effect, the harder it is to figure out. In some cases, years or decades may even go by. For example, on an intuitive level it sounds kind of silly to think that you could do something potentially harmful, and then stop and not do it again for more than thirty years and then it kills you. Unfortunately, that's precisely what happened to Leonard Nimoy: he died of smoking even though he gave it up decades ago.
When cause-and-effect occurs over such a long scale, comprising a significant fraction of a human lifetime, it's not possible for individual people to derive optimum guidelines for how to act from first principles. There are really only two ways to go about it: try to blunder through, alone or with the help of others blundering through along with you, and hope you make the right guesses... or learning from the experience of the aggregate wisdom of those who have gone before, who have been able to deduce some of the long-term cause-and-effect principles at work by seeing enough examples to work out the correlations.
In the absence of evidence, because the proof takes so long to appear, such a system of learned best practices for human behavior (aka "morality") provides a solid foundation for faith, to motivate people towards a course of action that is beneficial in the long term. It's surprisingly effective, too.
For example, you may have heard of Ignaz Semmelweis, who came up with the theory that surgeons who dissected cadavers should wash their hands with strong soap before attending to childbirth, to avoid transmitting deadly infections. His principle, when applied, consistently saved lives among new mothers, but unfortunately for Semmelweis and many women of his day, he lived in scientific times and he was called a quack, persecuted, and never taken seriously by his contemporaries, because he could not produce a valid explanation for why his theory should be true. (It worked in practice, but not in theory, so very few people cared enough to actually practice it! They couldn't see past their disdain for the notion that their own uncleanliness might be to blame.) It was not until the work of Louis Pasteur, right at the end of Semmelweis's life, provided a solid scientific foundation (germ theory) that established a theoretical reason for the validity of Semmelweis's work that the medical community started taking surgical hand-washing seriously.
Here's where it gets really interesting, though: this is stuff that had been known (but not proven!) for thousands of years. If you go to the Bible and look through the Law of Moses, (or other, older codes, for that matter, but this is one that's well-known and easily accessible to modern audiences,) you'll find directions all over the place for ritual washing after coming in contact with sick people, dead bodies, or other major disease vectors.
Religion is the lab notes of human history, to provide a foundation for faith that leads towards long-term positive consequences. This is a concept that's understood well enough that it's been seriously considered as a solution to the modern problem of nuclear waste storage: invent a religion that encodes principles of staying away from waste burial sites in its morality, because written and spoken languages change, civilizations rise and fall, and data storage media both ancient and modern decays with age, but religion endures through it all. It's the only way we know of to keep important information like that around and relatively intact over the time scales involved!
So to answer the question, would a civilization that started out with plenty of scientific knowledge come up with their own religion, the only possible answer is "yes, of course they would! And they'd probably be better off because the silly idea about religion and scientific knowledge being in conflict would never take root in their society."