One was combined arms training, courtesy of NATO--meaning largely the US. It started before Jan. 2021.
A second was the anti-tank weapons that had been sent to Ukraine---that was the subject of one of the Trump impeachments. It's facile to say that Trump was holding up payments that would lead to a shipment of Javelins and other lethal armaments. (It's unpleasant to admit, but sending lethal weapons to Ukraine started as the result of an executive decision made after Obama was months out of office.)
This was combined with a couple of screw-ups on Putin's military's side.
First, they had crappy combined-arms capability. They'd send in armored vehicles undefended for extermination by Javelins and leave troops unprotected. This wasn't due to errors and flaws in the military's training but because they simply didn't train their soldiers. Not their approach (at least at the time).
Second, they forgot that Mother Nature is always present in every conflict.
Third, the corruption in the military had led to poorly maintained equipment and poorly trained troops.
It helped that Bulgaria, I believe it was, quickly and surreptitiously sent Ukraine munitions.
But, yes, since then Ukraine's shown a capacity to innovate even as a lot of their young men see no reason to fight for their country. As in the US, the less familiarity you are with an evil, the less concerned you are with living under it; and the less convinced you are that your country is worth defending the more willing you are to just abandon it.