As the compounding frequency increases, the yield increases as well. But there's a limit to that increase.
Consider depositing $100 into an account at 5% interest. Let's consider a timespan of 1 year. These values were picked arbitrarily.
Using the formula A = P(1+r/n)^(nt), we can find the various yield amounts when n varies
The table below shows how A changes based on the values of n. I've let P = 100, r = 0.05 and t = 1.
As n gets larger, the value of A slowly approaches 105.13 when you round to the nearest penny.
So eventually the investment yield hits a ceiling of some sort. We cannot make the investment grow forever in some fixed amount of time (in this case 1 year).