The US+Allies/West-China scenario is analogous, except there is also a cultural barrier as well. We think differently to the West, we react differently to the West, but above all, we won't willingly rattle sabres.
You point out this Ukraine/Russia conflict could & should have been averted, but sadly people don't know the history of which you've written and the numerous caveats by several US Presidents and administration officials about the NATO "mission creep", and a buffer was necessary, in this case, Ukraine. The West has now forced the Scandinavians' hands into NATO and the die is cast - for now.
China too is encircled and threatened on 360º by missiles, the 7th Fleet and pacts such as 5-Eyes and AUKUS. Deputy Sheriff to the US, Australia, has flouted the Pacific Non-Nuclear Treaty of Rarotonga with concessions to the US military, with eye-watering purchases of aircraft and nuclear subs which won't be delivered for decades. All of these are for forward deployment, not defence. The US will arrogantly use Taiwan as a pawn with unsubtle threats and, as usual, fomenting dissent from within via the CIA and the bizarre but sinister National Endowment for Democracy.
The West complains about the BRICS+ alliance, but in the face of endless, strident provocation by word, deed and bellicose activity, is it any wonder like-minded, besieged countries such as Russia and China would group together? The worst is that as the West hegemony falters and fades, the stridency and idiocy grows - the latest risible comment being from the US that the failed peace in Gaza was proof positive that Xi Jinping's diplomacy doesn't work. In other words, it's all China's fault.
On this New Year's Day, the Year of the Dragon, all I hope for is peace, joy and tranquillity. I live in hope. However, I wish those who read this the same and for those who disagree, I would wish we can find an accommodation and peaceful middle-ground.
Apologies for the long rant.