The underlying problem isn't actually a problem with science, it's a problem with politics.
You need to hire some scientists to do your experiments. If they follow the scientific method, you get results using the best system we know how.
But if they follow the scientific method then the Republicans work to defund climate science research and the Democrats work to cancel any scientist whose results challenge the orthodoxy on race or gender.
And if politics interferes then it's not science anymore. If research leading to politically inconvenient results has its funding withdrawn or scientists are intimidated into self-censorship then it's all just selection bias and fudging the numbers.
Maybe what we need is to do something like the court system, where you have multiple research funding "judges" which have lifetime appointments and each get a given amount of research money to dole out every year, and their job is to decide how to spend it. Then they can spend it however they like and can only be removed for e.g. corruption, not for funding research somebody doesn't like.