I think he lost his temper over a variety of issues, ammunition, poor support from regular army, trying to absorb Wagner into regular army.
He lost it and went after those running the military. Probably not Putin himself but they've probably not been on speaking terms for a while.
Lukashenko and Prigozhin are buddies, Lukashenko offered to mediate as he's buddies with both. I don't think it's any more complicated than 2 buddies fall out and the buddy in common tries to smooth the waves, and succeeds, sort of.
Putin gave Lukashenko what he was prepared to offer - exile to Belarus.
In the face of loyal military forces and the Chechens on the way, Prigozhin realised the only off ramp for him was death.
Progozhin calms down, takes exile rather than death and leaves - probably dumping the Wagner troops who were likely to have been in fear of being punished - but sign this form to become regular army and we'll say no more about it.
Somewhere along the line this debacle has weakened Putin but I suspect not as much as we in the West would like and probably not the self imposed diversion UA forces could do with the nail RU in the counter offensive.