A home is an asset if it can be sold for money, or used productively. If it turns out that your property is so worthless that no one will buy it at any price, and it's also useless to you as means of production, then it's not an asset. That combination of circumstances pretty much never happens.
The asset value of a home is presumably offset by some debt you owe on it.... and if not, you're paying opportunity cost on the money you paid for the home.
Whether or not real estate is a good investment is much thornier. But real estate is unequivocally an asset.
If you buy a house for a cash, it will take years, until you break-even. And that's fine, businesses depreciate assets like this for decades, too.
If you buy a house with a mortgage, there are costs related to it too. You need to take it into account in your payback period.
However, you will eventually reach break-even point and since that point, you own an fully paid-for asset, that your kids can inherit, for example. With renting, you will pay indefinitely, and own nothing. You are just paying for the service of accommodation.
assets. items of ownership convertible into cash
So buying a house is indeed an asset since you can convert it to cash. Renting is actually pure cost