Magnetic mines and torpedoes were considered a very lethal threat to any vessel unfortunate enough to encounter one if the magnetic pistol worked properly. At the time Vanguard came into service, magnetic mines and torpedoes had been quite well perfected and were much more reliable than those employed early in the war. Large vessels like Vanguard normally had degaussing coils built in to them for protection against such weapons. These reduced the magnetic field around the vessel to below that which would activate the mine or torpedo pistol. Post war, however, magnetic pistols became even more efficient and utilized a system which would sense any change in the magnetic field, allowing even a degaussed vessel to be attacked; this led to a post war mini technology race in improved degaussing vs improved magnetic weapons.
Typically, even if structural damage was minor, a non contact detonation would still cause enormous damage to various ship systems--ie shock damage to radars, optical fire control instruments, turbine alignment, and so forth, depending on the size and strength of the warhead.
Their shoulders held the sky suspended;
They stood and Earth's foundations stay;
What God abandoned these defended;
And saved the sum of things for pay.