High tech torpedoes do (in some cases) hit above the water line. There are some that swim for long distances then pop up and strike above the water. But this is not likely here.
Figure that this is likely two mines. They put a trip line attached to buoys that float just under the water surface. When the ship comes in contact with the line, it pulls the mine to its side. This may look like a torpedo because you would be able to see the mine coming at the side of the ship while not seeing the cable that its attached to.
This could also be magnet bombs placed at night by small boats. It also could be remote control boat drones. Or even flying drones. Russia may have helped with the equipment. Russia benefits in numerous ways. Oil prices rise. America gets a black eye as well as Japan. And Iran becomes more dependent on Russia.