The two don’t really compare at all. The one advantage of renting is being generally free of most maintenance responsibilities. But by renting, you lose the chance to build equity, take advantage of tax benefits, and protect yourself against rent increases. Also, you may not be free to decorate without permission and may be at the mercy of the landlord for housing.
Owning a home has many benefits. When you make a mortgage payment, you are building equity. And that’s an investment. Owning a home also qualifies you for tax breaks that assist you in dealing with your new financial responsibilities- like insurance, real estate taxes, and upkeep- which can be substantial. But given the freedom, stability, and security of owning your own home, they are worth it.