What largely ended the use of torpedoes against surface ships?
Short answerAnti-ship missiles largely replaced them because they can strike at much longer range and a mission kill is often sufficient.
NotesA ship has finite space and must choose between anti-ship torpedoes and anti-ship missiles. Missiles reach far beyond the practical engagement range of surface-launched torpedoes while still being capable of a mission kill. The choice concerns which weapon makes the best use of scarce shipboard volume for a particular target set, rather than whether torpedoes ceased to be useful. Torpedoes remain important in anti-submarine warfare, while missiles became the more useful long-range anti-surface weapon.