It is pretty difficult to answer that question, but I will have a stab at it so that you can make decisions for yourself. The "rules" that I set for myself have changed in the last 40+ years. Allow me to share my mistakes. In the early years, I was content with a gain of 10%, sold everything and stuck the proceeds onto the next stock pick. Once this has been done a few times, there was often enough to be able to pick two holdings. (In those days, information was found in newspapers!).
Eventually I found that I was too concerned with chasing a profit that the losers were not disposed of (that took me 25 years on an ALL or NOTHING sort of investment pick) to discover. Then I began to run my profits, taking out a little here and there, but not with any structure or any reason other than I had found the "latest and next best thing". That wasn't very satisfactory either, more because there was no structure to y portfolio, just an awful lot of short term mistakes, some of which I fell in love with and kept averaging down (IGE) before eventually when things began to turn, I sold the lot to probably break even.
My portfolio is split 3 ways - ISA for self, ISA for wife and a joint dealing account. Each portfolio is considered on its own merit but all three considered as a whole. Therefore overlaps in holdings are avoided but the goals for each are the same. This means that although each is pretty chunky in terms of capital invested, there is latitude when considering the aggregated value. Thus there are about 70 holdings and, at the point of purchase, no single holding should exceed 3% aggregated portfolio but might represent a larger percentage in the individual "wrapper". Sometimes a sector becomes a little frothy and that is the point where I would top slice - most recently (January) it was ATT that had served me very well and I disposed of MOST, but not all of my holding. It remains prominent in my portfolio. The proceeds permitted the purchase of two other holdings at MY normal investment amount (£10,000) left me with 500 shares in ATT and a little cash for investment at a later date.
So, for me ATT had been a 4 bagger. There is no reason to doubt that ATT will not continue to reward shareholders for many years to come, but at the time that the decision to sell was executed, I saw better opportunity.
Shell had been in my main portfolio from 1979 continuously until 2018 when I sold the bulk of them. I now have under 500 shares in Shell and only because I forgot that there were some in certificate form. Oil was a cornerstone in building my portfolio but now that it is being prepared for retirement it needs to last the next 40 years. Therefore I have increased my portfolio appetite to risk and invest in sectors such as renewables which are going to take over.
Don't forget that the stone age did not end for the want of stone.
What goal do you have? Once it is achieved, what next?