Iran has negotiated like no one will ever attack it, and that was a correct assumption for decades
However, due to Iran's overly aggressive use of questionably rational proxies, Hamas has dragged it into a regional conflict where it lost most of its proxies power.
After the last war, it also is no longer a threshold state, so the only leverage they had left was ballistic missiles, which were also handled quite reasonably by Israeli air defense.
In this situation it is a fair request by the US to sign a nuclear deal that heavily restricts Iran's ability to enrich as well as ICBM, trigger with existing uranium stockpiles removed.
As Iran due to ideological reasons refused, and IMO had miscalculated this will be a win-win, as losing will quell the protests, the only thing really left is the metaphorical stick