The reason I say pandemics are in large part a public goods problem is that if humanity were perfectly coordinated, we would have been spending way more on developing rapid broad spectrum diagnostic kits, broad spectrum antivirals, coronavirus vaccines, stockpiling PPE, and so on.
They're a great deal, we knew they were a great deal for us as a species — we just couldn't find enough individuals or organisations or governments willing to fund them at the necessary level, because almost all the benefit would go to others.
Had we managed to make that happen, this pandemic would almost certainly have been stopped.
We would also have enormously cut back on human interaction with wild animals, like the civets that appear to have given us SARS-CoV2 (and the original SARS in 2003). There's no way that's worth the risk for humanity as a whole. But the people who eat civets bear something like a millionth of the cost of their reckless behaviour, so eat civets they will.
Market incentives, democratic governments, non-democratic governments, civil society, private philanthropy — all have made a dent on this collective action problem, but even all of them together have not come close to satisfactorily solving it.