I agree eventually there will be a settlement/ peace treaty/ armistice.
But at the moment, both sides seem to believe they will be in a better position to have that negotiation later.
Ukraine has been winning the war since this time last year, so understandably thinks they can continue to do so
Russia thinks they'll grind down Western support, even if it takes years, and can control their internal opposition, so will eventually be in a better position on the ground.
Until one or both sides changes their mind, fighting will continue, I think.
Of course, this is just my uninformed speculation.