Harpoon is an old weapon designed a long time ago. While entering service in 1977 was designed in 1970, as a western version of the Styx. The Styx is a chunky soviet weapon with, a 454kg warhead. It was developed in the 1950's. The 1950s, ships still had guns and armor, and mission killing or sinking a large ship required a large war head. Also these missiles could accept nuclear warheads that were all the rage. Guidance wasn't perfect either, the missile might strike are the front of the ship, far away from the super structure and engine spaces. A large warhead resulted in the ship being out of commission.
For most modern ships, and probably for most ships even back in the 1950s, ~100kg of high explosive with fragmentary casing is plenty to mission kill it. Ships have been completely disabled from a Seasparrow hit.
en.wikipedia.org
Modern anti-ship warheads are going to more of the ~100kg warhead. Guidance is much better, missiles are stealthier, more agile, longer ranged. Explosives are slightly better. For a ship, there is basically no armor anymore, and 100kg is plenty hard hitting for a large ship. Large missiles with war heads of half a ton or more are over kill for ships, and large, not agile, take up tremendous space. Hence also why there is a lot of development of smaller diameter bombs, guidance is so much better, you don't need to be dropping huge metric ton of bomb to hope you take it out. 100kg in through the window does the job nicely.
Same with aircraft bombs. We don't need 50x2000lb loadouts. Stormbreaker is a <50kg warhead. Spear3 is believed to use the 6kg warhead off brimstone, so imagine like a long range hellfire. Which is like a 155mm shell. Which may not seem like much for a 10,000t destroyer, but we can easily choose which window you want it to fly into the bridge, its plenty. So 120kg traveling at +900kmph is still overkill.
We are seeing drones carrying tiny explosives, hand grenade or smaller, take out premium tanks in Ukraine, dropping it through the hatch.
Most munitions have a surface attack mode now. SM-2/SM-6 ESSM. So Its not just the NSM that are antishipping. You can fire ESSM blk II as an antisurface missile. ESSM still has a ~40kg warhead and mach 4 speed~50km range. Sm-2 has I believe ~100kg warhead, mach 3 and ~150km range.
But the 250km range of NSM is neat. As long as you have some sort of sensor platform to acquire the target for you. Australia has JORN, Trident, P8, E7, MC55, SH, F35 and ships sensors and capabilities and embarked capabilities like the MH60R.
The the RAN ships all have really really big radars up really really high. I presume these days modern radars can provide ECM capabilities integrated as well as radar and illuminator functions.
So one of this smaller ships with ~64 ESSM, ~16 NSM, 57mm gun, torpedos, CIWS, CEAFAR, Helo packs quite a punch. Particularly operating say within ~1000nm of Australia's territory.
In Taiwans case, no gun is probably realistic. There won't be any time to start firing a gun, when everyone is firing high sub sonic or mach 3-6 type weapons within a ~300km space. You might as well fire all the missiles, then haul arse back to base at top speed