Three things:
1. From the perspective of shareholders, and for the moment ignoring taxes, buybacks and dividends are exactly economically equivalent. If a dividend happens, you get some cash. If a buyback happens, the value of your shares goes up. Crucially, the amount by which each share's price goes up is equal to what the per-share dividend would have been. It's a useful exercise to work this out and convince yourself that it's true.
2. Now let's stop ignoring taxes. If a dividend happens, you get taxed that year. If the value of your shares goes up, you don't get taxed that year. Instead, you get taxed whenever you sell, which might be later when you retire and are in a lower tax bracket, or after a period of some years when you get a lower capital gains tax rate.
3. Now let's think about the effect of dividends vs buybacks on the allocation of your portfolio as a shareholder. Neither changes the total value of your portfolio -- that was point number 1, plus just plain old conservation of dollars, modulo taxes -- but a dividend increases the proportion of your investment that's in cash, while a buyback keeps it constant. Let's say you auto-invest all dividends in the S&P 500 or equivalent index fund. Then dividends reduce your ownership stake in the company, while buybacks keep it constant.
For these reasons, most investors prefer (or ought to prefer) buybacks: they have the same economic effect as dividends but allow you to defer taxes to whenever is optimal for you. Also, and this is a smaller point, if a company does a dividend then you have to actively do something (that is, buy stock) in order to maintain the same proportion of your portfolio in that company. In other words, if you want 10% of your savings to be in X, and they do a dividend, then you have to take the cash and buy shares of X. The reason this is a smaller point is that at least in theory you can get your brokerage to do this for you automatically.
There are some nuances where point number 1 fails to hold: signaling, bad execution of the buybacks, and principal-agent conflicts. The big example of that final point is executive compensation tied to specific share prices. I'm not an expert in this area so I don't know, off the top of my head, if there's real evidence either way that this effect is very large, but it's one that people will bring up so everyone who thinks about this ought to know about it.