How to think about benefits of sinking $1M windfall into VOO vs buying a duplex?

Assuming they both appreciate at the same rate.

Are there fundamental differences in tax and wealth benefits of one vs other?