I was told that I have to constantly sell my stock then reinvest it to "lock in" profits. Is this true?

Might end up being a losing strategy.
Starting with an example balance of £10,000.
If you take profits on every time your stock rises by say … 5%, then you make £50.
But what happens when you start losing money?
If you drop to say £9500. The same 5% now only nets you £47.5
So every time you make money you end up cutting into your future profits, but when you lose money you settle with taking less profits. So do you take anything out then or just keep adding it in until you get back to £10,000…
Over time you will gradually erode your profit margins.

This is the same principal of people trying to earn a living trading.
On a good run, you have some money for yourself.
On a bad run, you end up worse off.
The issue arises over time though, so you may not notice this until a year passes.