You should first thoroughly familiarize yourself with how financing works....apparently you don’t seem to know much about it yet.
I think in your situation it’s totally doable to buy the house and I would do it.
But you can’t just compare all of that so easily....
If you live in a cheap apartment for the next 20 years and everything is great there, of course you’re better off like that.
But if the rent is raised, stupid neighbors move in upstairs, or you get evicted, it looks different. None of us have a crystal ball and owning your own property is something many people simply like to do....
With a child you probably didn’t make a list of what it costs you less if you don’t have one....I’ll put it provocatively like that now.