Peer-reviewed scientific publishing works like this: A scientist or a science team have a scientific question, and they come together to design and conduct an experiment to try to answer that question. The experiment may take months, years, or even decades.
Once the scientists have collected and analyzed the experiment’s results, they write up their findings and draw conclusions based on the already accepted knowledge in the field, their new discovery, and their educated speculations of what is yet to be known.