Rafael,
In general the best way forward is to own and not rent. So if you have the means to buy, then yes, it would make more sense. That being said, since this is your first job out of college, do you have the downpayment for a duplex or above? If not, you can still house hack a single family and just get roommates.
It's not as comfortable as "luxury" house hacking with multiple units, but it's just another options. You don't want to spend future money. Just run your numbers, use the BP calculators to be sure that the house will work for you AFTER you move out. No point in buying something that's going to continue to cost you money after you move out of it.
My background - my wife and I bought a townhouse and rented out our basement. It wasn't comfortable all the time sharing the kitchen and such, but our mortgage was around 400 dollars while we were there and now since we have moved, that property brings in 550 dollars in pure cash flow.
Finally, Brandon Turner's new book called multifamily millionaire volume 1 will be a great resource for you as well as Craig Curelop's House Hacking Strategy