It’s important to recognize that science has, across time, produced good and bad outcomes.
In the academic arena, you’d be hard pressed to find a scientist who isn’t genuinely interested in ultimately serving the societal good.
But sometimes good science yields unintended or unforeseen consequences (e.g., the atom bomb helped end WWII but also triggered the build-up of nuclear arsenals; and then there have been nuclear reactor melt downs and/or the lingering problem of nuclear waste disposal; in addition, there are non-biodegradable plastics, and myriad other examples involving the antics of folks/companies with an eye aimed toward exploiting questionable economic opportunities above all else. All of these are products of science in one form or another.). In fact, initially good (well intended) science may have inadvertently contributed to global warming, in a big way.
This alone gives justifiable reason for the general public to refrain from putting a blind trust in science or scientists (and engineers).
Then there are scientists with competing theories. Or with theories presently touted as sound, but later dis-proven. There are hucksters who use pseudo-science and/or make claims based on fake science that appears believable to the untrained mind.
I could go on but my point is this: It’s no wonder the general public ends up confused.
To them, scientists often come across as pompous and arrogant with their seeming insistence that science is the be all end all of good, worthwhile and trustworthy knowledge, despite this backdrop of a sometimes checkered past.
Once the seeds of distrust have been planted like this, it’s hard to undo (you can’t unring a bell). Under this circumstance, it’s reasonable to expect that some number of people will view science with a wary eye, or question its integrity, especially if its assertions contradicts their own beliefs and/or wishful thinking.
How does science effectively combat these circumstances that challenge it?
I don’t know. But perhaps there’s never been a more pivotal moment in time to derive that answer.