That assumes that companies will pay dividends and your can get a good estimate of future yield to value. Corporate earnings are a proxy for potential future yield when there might be future yield. But most large tech companies don't regularly (or don't ever) plan on doing that. We're left with a proxy that no longer works in most cases and in the cases it can, has already been arbitraged so that retail investors won't be buying future cash flows through dividends at reasonable rates.
Yes, it assumes you can get an estimate. Yes, this assumption can be problematic. Yes, there are limits. But, again, even the most problematic estimate is leagues ahead of "diamond hands, diamond hands, GME to the moon".
No, "yield" in terms of dividends is not necessary. Owning a share in a company that puts cash in a bank account is also worth money.
The most powerful practical enforcers of valuations are M&A and debt financing. Both are highly dependent on cash flows. You can narrate a stock up and down until the cows come home, but acquisitions and debt will set a fundamental floor based on economic reality. (There is no similar mechanism limiting upside given our cultural aversion to short selling.)
Stock buybacks are, if anything, often considered preferable to dividends, because they allow people who invest outside of tax shelters to control whether or not they want to have taxable income this year (by selling the stock on their own schedule, rather than getting a dividend on the company's schedule).