Isn't that kind of an apples-oranges thing? Ukraine is a backwater that never had regional ambitions and is merely fighting for its survival. Iran wanted to be one of the ME's regional powers.
With respect to the current topic now, Trump's ceasefire may or may not hold, but with respect to the situation thus far, here's my two cents. I don't think there's any way to argue otherwise, these past two years have been a strategic disaster for Iran. The short version is simply that the Axis of Resistance has been completely dismantled. The immediate consequence of which is that unfortunately, unless Ben Gvir's heart suddenly grows Grinch Christmas style, the Palestinian people will have to bear whatever revenge the Israelis are in the mood for. With three years to go in the Trump presidency, it likely won't be pretty for them.
However, the IRI despite its defeats in the war has thus far managed to avoid regime change and kept its nuclear program intact, they are winning on that front. With their regional empire in tatters, they can now focus inwards. A certain country has the ability to reap all the benefits by taking advantage of Iran's current weakend state and making it a satellite within the Middle East. But as long as Iran gets to work on finally building nukes rather than tiptoeing around the issue in hope for sanctions relief and create a somewhat competent ground army now that the need to rely on militias is gone, they can be a valuable satellite.