I believe the idea of common schools originated in the USA, or at least it did as far as Western countries are concerned. Well into the 19th century, the European attitude was that parents were responsible for providing for their own children's education, and nobody else's. Working-class children were largely shut out.
More contemporarily, the US is still in the top 10 by at least some rankings. But talking about those rankings doesn't sell ads or get the voters riled up or help rich parents feel good about all the money they're spending on private schools, so there's a tendency to cherry pick the rankings where the US is merely in the top 10%. Ideally followed by intensely fetishizing Finland.
(Fetishizing Australia, which tends to rank even higher than the nordic countries, never seems to happen. Funny, that.)
Our Ivy leagues are still generally the most resourceful, best equipped, and best staffed in the world.
It's changing though.