That's far less straightforward than something that just appreciates in value without you needing to rebuy it every time there's a dividend.
It's a single checkbox in your brokerage's UI.
https://www.schwab.com/stocks/dividend-reinvestment-plan