Focusing on reproducibility helps a lot: when one can do an experiment with fruit flies one can see if genetics or lysenkoism better explains the results.
Last but not least, I agree completely with your view that disagreements are solved today on Twitter and FB and this is not good. While somewhat tangential to my main point (focus reproducibility and scientific methodology can remove most other obstacles): given their impact on society and the active role they decided to play means that they should be regulated the same way as other mass media, both for monopoly checks and for responsibility for publishing materials.
Scientific consensus is "when almost all scientists in this speciality believe this" and takes a lot of time to reach.
Scientific consensus also happens via peer reviewed summaries of research in a particular domain.
In order to do that, there has to be a framework. The framework currently used is a peer reviewed publications. Currently, the disagreements are being settled not based on experiments in but on opinions in mass media, Twitter threads and Facebook posts. That's not the agreed upon framework.
I know that "peer review is fallible" but that's the current agreed upon framework. None of the others are ideal, it's the best we have at the moment unless we come up with another one.