Well, yes, doing something is obviously the way to go.
But there is a difference between doing something meaningful, and doing something for the sake of doing something.
The past years have been full of such instances where "things have been done because something had to be done", without any real consideration for the actual outcome. If it does not solve the issue, or, at least, heads in a direction that would ultimately lead to the issue being solved, the "something" that is done is as worth as flapping one's arms in the rain.
It looks good for PR purposes, but that's pretty much it.
One could argue the time it took for the US and UK to carry strikes, in addition to the pretty anemic "coalition", the lack of actions for a long period of time despite the repeated attacks, and the fact said attacks resumed immediately after the strikes comforted the Houthis and their allies in their views that they were relatively safe to do whatever they want.
They can keep on targeting civilian ships, board them, etc... and ultimately inflicting financial hurt upon the West; all that for a few bombs dropped on them. Gamble wise, it is worth it in the Houthis pov.