The main thing is to compare the cost of renting vs owning a similar unit. They way it’s apple to apple rather than apples to Oranges.
So, if you rent an apartment compare what it would cost to buy a similar size condo/apartment.
If you rent a house, compare what it would cost to buy a similar size house.