In this case it's land based piracy.
In this case, the Strait is so narrow that it sits in the overlapping territorial waters of Iran and Oman … and it is only considered “international waters” under the terms of the UNCLOS agreement which Iran has never ratified. (And neither has the U.S., by the way.)
“How can a country collect a toll in international waterways?”
Legally they can’t. Under the United Nations Convention on the Law of the Sea (UNCLOS) and transit passage principles, international straits used for international navigation cannot charge flat tolls for passage, though coastal states may bill for specific requested navigational or environmental services. The UN took this action ending with a re-enforcement in 1994 to this day.
wy69