(Edit: For context, for anyone here who has never seen what happens for the minute after you behead a chicken...)
Biden will run for re-election and needs to accrue political capital.
The USA came up with a lame excuse to veto the Brazilian resolution in the Security Council. At the same time, Biden was there "trying to convince" Netanyahu and al-Sisi to allow humanitarian aid through the Rafah crossing into Gaza.
In the end, even though the agreement Biden got was a lot weaker than what the resolution was trying to achieve, it gets spun as a diplomatic victory for Biden.
This is all very simplistically explained, of course. Reality is more nuanced than that and I could be wholly wrong, but this is more or less my understanding of the situation.