For pure protectionist reasons, they are in the long run generally bad.
As a response to unfair trade practices, they can be appropriate.
In other words, If they are used to create a “level playing field” then they can be helpful to change behavior. If purely for protectionist purposes, then probably not good in the long term.
But then again as Keynes said, in the long run, we’re all dead.