Well right off the bat i can think of two, depth charges and torpedos.
Because of their size and complex bathymetry in the straits, those subs can lay in wait, on bottom, and 'ambush hunt' ships. They are diesel electrics, and potentially
very quiet. The more traffic there is, the harder they will be to find. Range: 550 nautical miles (just about 1000 km).
Iran started the war with 23, is believed to be down to between 2 and 10 left operational. Some have been designed to launch antiship missiles, others had only torpedoes.
I'm not saying they'd last long after attacking, but we're dealing with a suicide cult, and they could do some damage. (Why no carriers are cruising through the Straits.)

Sometimes, relatively primitive and basic systems can be effective.
Remember the first vessel sunk by an enemy submarine was sunk by a submarine that was hand cranked through the water by its crew.
CSS Hunley