Rent or buy?

I'm 30yo single trying to figure out if I should rent or buy. I was renting for the last 8 years post college, recently moved home to figure out my next move.

I'm looking in north county San Diego. Rent can range from 2-3k give or take for a 1 bedroom. There are some condos 1-2br in the 500-600k range with hoa ranging from 400-500 a month.

I can put down 20% on a 600k property with some leftover emergency fund.

My mortgage would range from 3,500-4,000 a month. I keep telling myself it makes more sense to buy and pay another grand or so per month than I would for rent, right?

And while yes the free rent at my parents is nice, I need to return to my social life.