The United States is already at war with Iran, squeezing its economy down to nothingness. If another country tried to do this to the US just on a whim and with no UN or international-law basis, the US would certainly launch a war over it. Iran's choices are much more limited because it is a small, weak, Third World country, with not so much as a proper air force. But countries without conventional military capabilities that are squeezed like this by an enemy reply with unconventional tactics.
Trump did this to Iran despite Iran's adherence to the 2015 nuclear deal or Joint Comprehensive Plan of Action (JCPOA), as certified quarterly by the UN International Atomic Energy Agency.
Iran oil exports before Trump Breach of Treaty and Severe Sanctions of 2017:
2.5 million barrels per day (# 6 exporter in world after Canada)
Iran oil exports in June 2019:
300,000 barrels a day
(# 27 in world, after Equatorial Guinea and Australia)
Iran's economy grew an incredible 12.9% in 2016 after the UN Security Council signed the nuclear deal with Tehran and lifted sanctions.
In 2019, Iran's economy
under US sanctions will shrink an incredible 6%
Al-Jazeera English reports that "the rial, plummet[ed] by about 60% over the past year. Inflation is up to 37% and the cost of food and medicine has soared by 40% to 60%, according to EU figures."
Note that Trump's sanctions are unilateral. They haven't even been approved by Congress, and are actively rejected by the United Nations Security Council.
They are a form of financial blockade. Physical blockades of this sort are considered legitimate causes for war in international law.