It’s not who’s more willing to die, both sides have high casualties, it’s a numbers game. Russia has far more troops than Ukraine does.
The reason the war is taking so long is because Putin is in no rush. If he had gone in there at full military strength it may have prompted western forces to send in their own troops and even more military aid.
Putin probably doesn’t care if this takes years because the outcome is a forgone conclusion so he is simply letting the Ukranians expend all their resources until they decide to capitulate.
The world at this point is becoming bored with the war and the aid for Ukraine is drying up. Any supplies they do receive from the west are destroyed relatively quickly.
Another interesting aspect is that Ukraine hasn’t even faced off against Russia’s main army yet, this whole time they’ve only been fighting screening forces.
There is no way Ukraine can win this without serious support from western nations and nobody wants to risk a nuclear war with Russia over this conflict.
Putin said it would be a 3-day war. Putin has real hostility from many of the people. People who are fighting to protect their homelands and families fight to the death. Those sent to fight a war they do not understand and may even disprove of are just trying to survive to go home. America showed how bad a way that is to fight.