To understand that ethics is built on knowledge consider a false ethic, such as all people with brown eyes should be enslaved. What false claim to knowledge would justify that false ethic? One possibility would be the claim that there is an omniscient creator deity who has told us that the divinely favored blue eyed people are rewarded with everlasting life in heaven provided that they enslave all divinely disfavored brown eyed people.
People are reluctant to acknowledge that if the mistaken claims of knowledge endorsed and promoted by ISIS are correct than their practice of beheading opponents, kidnapping women as sex slaves, killing homosexuals, etc. would arguably be ethical. Creator deities who are to be worshipped and obeyed can be cited to justify otherwise unjustifiable ethics. Not all mistaken beliefs result in equally unethical behaviors. Falsehoods masquerading as knowledge can correspond to mostly good ethics, but even then valuing falsehoods in the name of ethics tends to either hold us back from accepting an increase in knowledge or render the ethics fragile when confronted by an clashing increase in knowledge.
Knowledge precedes ethics. Knowledge is built with an indifferent lack of bias. To get from knowledge to ethics we actively introduce a bias to favor the outcomes that are better for humanity over alternative outcomes that are worse for humanity. What should be depends in part on what is, and what should be also depends in part on viable could be alternatives, which also depends on what is. To be meaningful ethics must be non-fictional. Fictional ethics, ignorant ethics, are a self-contradiction.
Answers to how the universe works answers undergird ethics. What alternative outcomes are better for humanity? How can we most quickly obtain and implement effective better outcomes? What can we learn about a problem with negative impacts for humanity that can be applied to countering the problem? Chronologically, answers to how the universe works question come first and provide us with the understanding we need to more effectively bias the outcomes in favor of humanity. Some religions appear to have a tendency to get this sequence backwards. They claim that there are some assertions about the how universe operates that need to be true to justify ethics and therefore those assertions are true. That is wrong, there is no such “therefore”.
It is common for people to try to argue otherwise. A common saying is that what should be cannot be derived from what is. What does it mean to “derive from” and in what sense is one derived from the other? Clearly, knowledge and ethics are different, they are not synonyms. Yet they are dependent on each other. We start with knowledge and apply to it the goal of promoting general human welfare, opposing the factual indifference of the universe, to promote the general benefit of humanity, in pursuit of obtaining the should be of ethics.