I think we can put property taxes aside, you’ll have to pay your landlords property taxes if you rent after all.
If you can afford the cost of a down payment (more on that later), then buying a home does have some utility in wealth generation. You’re right that most of the initial mortgage payments go towards interest, but even collecting 25% of your monthly payment towards your own net worth is a big deal compared to collecting 0%. Especially since there is a good chance that your landlord has a mortgage too, either original or secondary to afford more property, so you must pay their interest plus a portion of their living expenses. This is why generally speaking home ownership is considered superior to renting if you’re not going to move anytime soon.
I think the main argument against home ownership from a wealth standpoint is that it ties up a large amount of money as collateral that you could otherwise be using. Here in SoCal purchasing a home with a traditional 20% down would involve locking up $200,000 that could be put into the market productively, potentially making me even more money. This is why the counterintuitive rule is that if you have enough money to buy a house with cash, you should get a mortgage and invest the rest, as you’ll be better off that way in the long run[0].
[0] Caveat here being your age. If you’re 30, you have another 30 years for the difference to grow in the stock market, while if you’re 70 you’d probably appreciate the lower cost of living and stability that this provides.