China sees the Ukraine war as shaking up many national interests which presents opportunities and threats to China.
However the Ukraine war ends up, Russia won't be coming out a global winner. The break with the West is not short term, Europe will not go back to dependence on Russia for oil and gas, sanctions won't be lifted entirely whilst Russia's forces are in Ukraine. China has a big demand for fossil fuels, most of which go through the Malacca Strait which is ringed by countries which are not China's allies. Russian oil and gas helps with this problem and are selling at a low price to China to boot. China has a massive water issue in the most populated areas of the country - Russia has the biggest freshwater lake in the world within pipeline distance. In short Northern China has a huge population with few natural resources and Eastern Russia has a tiny population with massive resources.
China has always contested Russia's Primorsky Krai region and never accepted the ceding of Manchuria. Russia has always had challenges defending the area plus it is home to arguably the most important strategic port for Russia. I imagine China has one eye on the negotiating power that might be achieved if China is almost the sole consumer of the only goods that keep Russia from imploding economically. China has already extended influence on their western border within countries that are traditionally highly aligned to Russia. Russia's weakness will be an opportunity for China to increase their influence on critical borders.