It's very hard to compare some of those things as they differ from home to home and country to country. Here in the UK most landlords will do extreme minimal maintenance and taxes on the house are paid directly by the tenant and not included in your rent.
"Realtor costs" are again different some estate agents in the UK charge a % of the sale price others a minimal fixed cost.
I'm sure that these things differ massively in different countries as well so it's hard to put an average number on that.
In terms of opportunity cost of the money again it depends on how you would invest that money you could put it in something very high risk and show a huge imbalance in buying a home vs investing in crypto or something like that. In the UK most low risk savings accounts will track lower than inflation on a property only the stock market will track higher but again that's higher risk and so not comparable. Also most savings accounts in the UK are capped at a max amount that can be saved per year.
As I said though if you try to compare mortgage vs something like stock market it's not really comparable. Also to note the large index funds in the USA track much higher on average than most other countries.
I've seen people use the S&P as an example that house prices don't track to the same amount and that you can compound any gains to make large sums of money. What's interesting about this is that the reason you make so much money with that model is that compound interest is non-linear in growth which means over say 40 years you make most of the growth at the end of the period (Literally in the last 20%). This also means that if the end of your growth curve ends on a bad few years for the S&P you'll do much worse than the average so the risk is still very high on even index funds.
Overall though my current mortgage cost is 2.5 x lower than rent for a comparable property. So you'd have to factor in the opportunity cost of that extra per month I save not paying into rent into your equation as well.