Hold on to your hats when I say this, and I say it in a way that "a broken clock can be wrong twice a day" sort of way, but it actually may be true that Trump is the reason for as good as it can get ceasefire and potentially some sort of end. Bear with me...
From Ukraine's POV on needing Trump:
Zelensky (via Kiev) wants to reconcile with USA from that embarrasing meeting
Zelensky seems to suggest that the costs of any imperfect ceasefire are currently outweighed by the benefits
Those benefits are getting him back in the game and having a seat at the table for any peace negotiation
Keeping his job (approvals for now and then later)
Fixing the relationship with Trump as it's argued and written that he (USA) still holds sure defeat and/or the closest thing that can be described as victory for Ukraine, in his hands
You see that with the reeastablishment of intelligence and money
From Russia's POV on needing Trump:
Putin wants to continue the thawing (detente) of relations with USA more broadly in an established way so needs to look cooperative to Trump/DC
Russia needs narrative cover for why the cease-fire
Russia needs narrative cover for why a peace agreement
Putin needs ego cover
Putin knows this can't go on forever and Trump is as friendly as he could have ever hoped for and will ever get in Washington
It's weird to think that being an abrasive leader has, for different and same reasons, gotten to this point.