What matters at the end of the day are the irrecoverable costs. When renting, it is just the rent. When owning, it is certainly not free: you're paying other irrecoverable costs (e.g. out of PITI+HOA, everything but P is irrecoverable; add on separate costs for when you must pay for repairs and it gets steeper). Sure, you have stability and can write off mortgage interest when you own (although the latter is an extremely unfair policy), but unless one is absolutely sure that one can stay in the home for close to ~7 years (the rough time it took for many HCOL cities in the US to recover their nominal prices from the GFC peak), it can be considered to be a risky time to make such a big financial commitment.
Ben Felix has some videos on this concept of "irrecoverable costs" which I find helpful to illustrate this, such as this one [0]. Although I disagree with his idea that leasing cars is a good idea (expressed in some of his podcasts), I find his ideas on renting vs. buying to be quite sound.
Personally speaking, I just doubled my compensation by moving from one HCOL city to another in the US because I was renting and not "locked in" to a mortgage. So many colleagues at my former place could not afford to come to the closing table with cash to close out their mortgage at a loss to move (the company I went to basically wanted to hire my whole team, but I was the only one who could manage because I wasn't committed to a mortgage). Eventually I do want to own a home myself, but it was eye-opening how poor of a choice it was for my former colleagues (although my choice to go to grad school during most of the QE decade probably more than compensates for this one win...).