Just to expand on what other people have said.
In February 2022 the world thought that Russia was a military superpower just behind the USA, for generations the Western population had lived in some kind of fear of a war with Russia even 90% of action films up until probably the 90s Russians are the bad guys and Hollywood played on the fear of nuclear Armageddon with Russia(which was close on a couple of occasions).
Most people, me included expected Kyiv to fall within a week, a puppet government put in place through totally legit elections with 99.9% of votes in favour of the new candidate.
I expected some sabotage groups and some guerilla warfare but ultimately Ukraine to fall under Russian rule.
What most people didn't take into account is how corrupt Russia has become under Putin with everyone taking a cut of the money or resources at every level of the supply chain to the point what was left is dregs and scrap, in fact probably the only person of influence within Russia who wasn't actually taking a cut along the supply chain was Putin as he has bigger pies to stick his grubby little fingers in.
I also think that if Russia had succeeded in Ukraine then China would of taken heart and invaded Taiwan, it was no coincidence that China was gathering in force towards Taiwan and Russia was gathering on the Ukrainian border and Russia waited until the Winter Olympics had finished in China for the invasion of Ukraine to begin, I think some kind of unofficial agreement was made between Russia and China.
I think that Russian incompetence, corruption and brutality alongside NATO backing, EU sanctions and Ukrainian determination halted a series of other conflicts happening around the world.
In regards to Putin must of known the state of the Russian military and attitudes in Ukraine towards Russia I wouldn't want to be the one to admit I sold the engines parts from 400 tank or cut corners and used cheap materials on body armour or used the money to maintain the black sea fleet to buy A personal armada of pleasure boats. I remember early on in the invasion on a Putin speech and somebody said something he didn't like and he verbally ripped him to bits infront of everyone and people who upset him tend to have nasty accidents or long prison sentences.