The main reason why they have the second GDP in the world is that there are a billion of them
If China would have only 100 million it would be the size of Mexico, just a bit above the Netherlands.
This thing about having the largest or second or third GDP but just because of the population is misleading, China has the second GDP in the world but it has the 55th or 61th nominal GDP per capita, just like India is 5th or 6th overall depending on sources but below 150 per capita.
Of course, there is a good partt as it's easier to double the revenue of a guy who earns 100$ than the one who is making 100k, but at the same time, with China facing a population decline that might be already happening this year the growth will be completely erased.
Not saying that they haven't grown far faster than other counties which were in the same situation back in the 80 or 2000, but numbers are sometimes misleading.
The Chinese One Child Policy has been stopped a few years ago. In the last 3 decades, Chinese population growth was so low and the One Child Policy will have a long-lasting effect in the next decades to come. Soon China will have a huge aging population and there will be a population decline and maybe it started already. The Chinese government utilized its huge population for cheap labor to drive its economy. But now, China is shifting from labor dependent to becoming an investing nation. China will have a declining population but its economy will continue to grow. This means that the population is not the main factor anymore. Its GDP per capita will continue to rise.