He really is all over the place.
So it seems this has gone like this:
- Trump tears up Obama deal in his first term, Iran starts working towards a nuclear weapon again
- Trump hits out at Biden and the Democrats over increasing chances of war with Iran
- Trump gets back in, wants to sign a deal with Iran to stop them from building nuclear weapons
- Israel scuppers deal by bombing Iran
- Trump wants credit after Fox News and others praise Israel for those attacks
- Trump joins in on the attack, then immediately tries to avoid escalation by stating the attacks were now finished
- Iran also tries to avoid escalation - Trump thanks them - declares a ceasefire
- Trump is now genuinely angry that it isn't the end of it
It's like a child who can't control their temper and isn't familiar with the concept of consequences.
He doesn't want a conflict with Iran but couldn't control himself from joining in with Israel's attack lest he loses the respect of morons. So, he tries to engineer a situation where he can appear tough while still getting what he wants in the long term. He is now angry that this little escapade might undermine the long-term goal.