买房 is for long term, 租房 is for short term.
For short term, you can say rent (which is based on 50-100 year of total cost) is better than mortgage (which is based on 30 year total cost, assuming 30 year loan).
But for long term (say 100 years), owning a house is much cheaper than rent.