I don't know anything about this but I am a software engineer.
Stop laughing for a minute because I do have a point.
As a software engineer, I typically build something and engineer it so I can iterate quickly and improve it. I know that the first version won't work.
Isn't this a perfect opportunity for Iran to iterate on sinking cargo ships? I'm struggling to believe that a regime that is (allegedly) weeks away from a nuclear bomb wouldn't be able to keep launching missiles at ships until they notice the right type of hole.
And, think of the apprenticeship opportunities.
Yes, Iran has already hit several merchant vessels. Their ability to do that occasionally is not in doubt. It's mostly a question of economics. The ship owners and insurers have to decide whether it's worth the risk to run their cargoes through. This has all happened before with the 1980s "Tanker War" between Iraq and Iran: despite some losses the traffic never completely stopped.
And large merchant ships, especially crude oil tankers, and quite tough to sink. When they take a hit it usually just causes some damage.
Iterating on a rocket design is not like making a tweak to a line of code. It needs production line changes, manufacturing, testing, (repeat X times) where the process takes weeks, months or even years untill desired results can be achieved. And their manudacturing sites have been reduced to rubble, so that slows things down too.
Iran doesn't want to sink merchant ships. They want to extort money from merchant shipping companies by threatening to sink their ships if they don't pay for 'protection'. All they need is a credible threat, which they already have absent any naval ships willing to stay at point blank range to defend merchant ships.
While there are religious, cultural and political aspects to this, the Iranian govt has primarily become a kleptocracy in recent years. It sustains power through the Revolutionary Guard (aka IRGC) which has grown into what's essentially a state-run, money-making commercial enterprise. It collaborates and colludes with various entities across the Iranian economy which it controls either directly or via bribes and coercion. While reasonable people can debate what the recent attacks on Iran accomplished, they certainly nerfed a large part of the IRGC's income. The new Hormuz extortion scheme isn't just retaliation or vengeance, it's replacing lost income which is urgently needed to prop up the Iranian government.