That's because the west exported all of its manufacturing there.
China is among the highest in raw carbon emissions, but has an extremely low per-capita emissions rate. Compared to the US, who's per-capita emissions rate is among the highest in the world.
Plus, China is making a sharp pivot towards the development of renewable energy, electric vehicles, and transit oriented development.
And the global supply chain its been building, whatever one might think of the Belt and Road initiative, allows them to cheaply sell things like solar panels and rail infrastructure back to the countries supplying them with raw materials. Allowing those countries to electrify in such a way as to skip over more carbon heavy forms of power generation.
There's context here, and saying "But China burns so much coal!" doesn't tell the whole story. They're not burning it in a vacuum, for funsies.