Another well known strategic mistake. The moment you unilaterly start a war, you aren't able to determine when you will stop it. Russia might be content on achieving its limited goals, but who said that Ukraine is content with that, Ukraine might as well as continue the war ad infinitum. On other words, you can decide to unilaterally start a war whenever you like, but the other party has to agree if you want to stop the war.
So yes, maybe Russia's inititial goals were limited, but they should had taken forceful measures to ensure that if Ukraine really decided to go all in to damage Russia as much as they can, that Ukraine wouldn't be able to get supplies/help from external actors.
Strategic principles are quite clear. If you go for 1vs1, you take care so the other guy doesn't bring the whole gang with him to swarm you like flies. Its Putin's fault, hubris, and incompetence that has led to this.
There are no excuses for China on this. Strategic war principles are pretty clear. First you get to (or close to) 100% certainty that you can deny external interference and then you can calmly start your war. The only other (IMO quite low) possibility is that China might be willing to show weakness in order to draw far away US forces near Taiwan where China has the biggest advantage and can quickly eliminate US assets.
The biggest lesson that China can take from this war and apply to Taiwan, is to stay steady, cover all high possibility scenarios (including foreign interference) and keep doing whatever it has been doing so far successfully. R&D, procurement and joint-level high intensity realistic training. And yes, burn all the Russian books about their so called superior theories on warfare. Its a shame to even have to read them while watching this clusterf*ck happening in Ukraine.