It’s one way of doing that.
People who have systematically tested six different ways of doing that will nearly always report that that one came out worst, of the six they tested.
And many beginners’ trading textbooks explain pretty clearly why that’s so.
It certainly is, but there are other, better ways.
I’m not trying to offend or insult anyone, and I don’t know who told you this anyway, but I think it’s possible that that might not be the most reliable source of “information” you’ll find, here.
The specific problem with trailing stops is that they seem very logical and sound like an attractive compromise, but it’s terribly easy not quite to appreciate how often they actually cost you money by being hit too early after you’ve got the overall direction right. And I’ve seen plenty of members here (and in other places) rightly saying this, too. It isn’t a “secret”!