Not just clamping down on emitting cars and bikes, and many of the bikes were already electric (lead acid battery) anyway.
They set a goal to dominate EV tech, and achieved it. They banned a lot of domestic and business pollution, particularly wood and coal burning near cities. Interestingly, wood burners are becoming popular in the UK again, as a "feature", and people are complaining about the pollution and massively impacted AQI.
China also invested heavily in public transport. They have more metro lines than the rest of the world combined, built in an incredibly short time. Forget Musk's crappy tunnels, the Chinese have refined the process to be incredibly efficient and fast, and put proper trains in them. Bus services (electric) are excellent too, and of course high speed rail. Again, more HS rail than the rest of the world combined, and they are now building ultra fast maglev lines base don domestic technology, which will probably open before Japan's does.
They also have the majority of the world's tallest bridges, and are able to build those at record pace too, which reduces journey times and the emissions from them, as well as making EV range even less of an issue (not that it is - they have 5 minute recharging and battery swap tech).