There are a number of demographic differences between countries that make direct comparison of health outcomes difficult.
Also, that commonwealth fund report really downplays health outcomes in their ranking criteria, in favor of nebulous stuff like affordability and equity. You can die for free with no healthcare but if you get treated for various things like strokes or cancer in the UK your odds of a successful outcome are much worse than the US. That’s what I would care about but these commonwealth people have a different agenda.
Even the Commonwealth Fund study in question concedes that, while they ranked the NHS as the number one health system overall, its competence in the small matter of actually keeping its patients alive was the second-worst of any country under consideration.