First some background answers I've written that will be helpful for setting the scene:
I point to these answers in particular because they get at some of what made the collapse of the Soviet Union different from Chinese liberalization. For all the economic changes that have taken place in the People's Republic of China since 1978 - and they are substantial - it is still a unified political entity under the control of the Chinese Communist Party.
In contrast, the Communist Party of the Soviet Union ceased to exist in 1991, and the Soviet Union (with its single economy) was replaced economically and politically with 15 new countries, which range from the developed (such as Estonia) to the desperately poor (such as Tajikistan). The space of the former Soviet Union was wracked by economic collapse (causing a depression far worse than the Great Depression experienced by the US in the 1930s), a complete political disintegration and restructuring, a demographic collapse, and a building of new economic and political institutions almost from scratch (which especially in a crisis is a far taller order than reforming and liberalizing existing institutions).
On top of that, Russia had to deal with dismantling a massive imperial legacy in a way China did not have to contend with. Something like at least 15% of Soviet GDP was spent on defense, maintaining a military that by many standards was the largest in the world and global in scope. Winding down these commitments, whether dismantling nuclear ICBMs, to transferring troops out of Berlin, to closing listening posts in Cuba or naval bases in Vietnam, cost money and were inherited burdens of a type the PRC simply does not have.
But finally: with all that said, I don't think it's fair to say "Russia's economy has stagnated since they ended communism". The Soviet economy collapsed starting in 1989, and Russia (along with the other former Soviet republics, and frankly all of the former Eastern Bloc) faced massive economic downturns in the early 1990s. For some republics, they never really pulled out of this hole. Russia, however, has, and has saw its GDP grow massively at the beginning of the 21st century, in no small part because of revenues from oil exports. Its economy grew at a much slower rate after the 2008 recession, and has mostly stagnated since 2014, but the growth rates of the first decade of the 2000s rivaled China's, and put the Russian "R" in the BRIC designation first coined by Jeffrey Sachs in 2003. Which is to say: Russia has some serious structural economic issues to this day (which are beyond the 20 year rule of discussion), and had a particularly hard economic transition in the 1990s. But its economy has moved past its Soviet levels, at least.
A final note is that China's staggering growth rates are in part because it started from a much lower level than the USSR, and was a much, much poorer and still majority-agricultural country when it started economic reforms in 1978, while the USSR by that time was a majority-urban and industrial economy, and so many of its issues are more of the "rust belt" type transitioning away from heavy industry. ETA - so to clarify, China's astounding growth rate (while it is astounding) is in part a function of it starting from such a low base: earning $11 after earning $10 the previous year is a 10% increase, while earning $101 after earning $100 is a 1% increase, despite the latter example having more money to start with. Russia by GDP per capita and GDP per capita PPP is still at a higher level than China, which is a bigger economy by virtue of having ten times as many people despite the lower per capita rates.
There are a lot of different angles that you can take with this, I'm going to take the economic angle since that's what I know well enough to talk about but other people could give equally valid answers that cover completely different ground.
First lets go over how industrialization works economically. Pre-industrial societies are generally dominated by agriculture and the average productivity of a pre-industrial peasant is pretty low. With even very simple industrial production you can often get a single factory worker to produce much much MUCH more than that peasant even after taking into account the costs of the industrial machinery. Since you don't have to pay workers that much more than the (very low) levels of pre-industrial peasant income to get them to leave their farms and go to work in your factory then you can make windfall profits. Those windfall profits can then be reinvested into more factory machinery et. an the whole thing explodes. For this to work, however, you need several things (this isn't by any means an exhaustive list but this post is getting long enough as it is):
Going down the list you can see that China had huge advantages over Russia in terms of being able to rapidly grow via basic industrialization:
So because of all of this, China has been able to grow rapidly. But will it be able to keep on growing? If Russia has a bad case of the Dutch Disease than China seems to be falling face-first into the middle income trap.
If you look at the advantages China has been able to enjoy a lot of them stem from being able to draw huge numbers of economically unproductive farmers out of rural areas who are willing to work for very low wages. That's drying up. Chinese wages are far higher than they used to be and there really aren't huge numbers of young rural farms who can be brought to the cities for low wages. Now while that is obviously a very good thing for average Chinese people it means that China is going to have a lot of problems continuing to grow.
Other countries such as Indonesia to give one of many many examples are now starting to undercut China since the wages are lower there. China still has an edge because it's simply a lot easier to find the right suppliers, workers with the right skills, etc. etc. in China but how low will that advantage last with basic industrialization booming elsewhere. If Chinese products are more expensive because Chinese wages are higher will people really pay a premium for things made in China instead of things made in Sri Lanka?
Now that doesn't mean that China will crash, just that it'll start to stagnate. It has a much bigger domestic market than it used to but the middle income trap will hit it hard. It's easier to expand when the main edge you have is cheap labor but if you expand enough that your labor isn't cheap anymore then what then?
Korea was able to avoid the middle income trap because people will pay more money for a Korean car or cell phone than a Chinese one and its cultural cachet has allowed it to bring in money in ways aside from industry. These days Japan is huge in machine tools and is doing OK even as a lot of its consumer brands are declining. But due to the dead weight of the CCP, China doesn't do well in terms of cultural exports (just look at what's happened to the Hong Kong film scene), or attract much tourism compared to the huge size of its economy, etc. etc.
China will continue to be a huge economy but you'll be seeing less and less "Made in China" in Walmart in the coming years due to simple costs which will take a big bite out of its growth rate.
Again note that I haven't really talked about government policy or organization pretty much at all. There's another huge post there covering a lot of additional ground.