Russia and China have the objectives of their own. For Russia it is to expand their empire that in their own mind rightfully belongs to them. They didn't attack Ukraine because of US actions but because they seriously believe that they have some kind of right over Ukrainians lands, or even more seriously, that Ukrainians don't exists.
If US would have been in Ukraine, or moved in rapidly when the situation became dangerous, there wouldn't be war at them moment. We see this clearly play out in far east, where China has ambition to overtake Taiwan (what they like Russia with Ukraine believe to belong rightfully to themselves). They clearly would have already attacked if it wasn't clear that US will prevent them doing so.
I'm certain that they would have done it, had US backed away from Ukraine. I'm also certain that what led Russia to believe that they could pull off Ukrainian invasion, was the US departure from Afghanistan, not that they did it but how they did it by letting Taliban completely humiliate them without any response. Russia believed that US is weak, not interested, and it would possibly have been like that, had Ukraine not managed to pull off very strong response.
US is there to fill the vacuum. If it was not US, it would be China (or it could Russia possibly). If not today, then eventually it would be one of them. I prefer US because it is more predictable and rule based and in the long run more favorable for the people.