Equity is to stock what
fruit is to an apple.
Stock is a specific kind of equity. An apple is a specific kind of fruit.
In other words, every kind of apple is a member of the fruit category, just as every stock certificate is a member of the equity category. But it doesn't work the other way around; e.g., not every kind of fruit is an apple. Likewise, not all kinds of equity equals stock in a public company.
https://www.accountingcoach.com/blog/equity"
Equity can indicate an ownership interest in a business, such as stockholders' equity or owner's equity.
Equity can mean the combination of liabilities and owner's equity. For example, the basic accounting equation Assets = Liabilities + Owner's Equity can be restated to be Assets = Equities.
Equity can mean an owner's interest in a personal asset. For example, the owner of a $200,000 house that has a mortgage loan of $75,000 is said to have $125,000 of equity in the house."
To your specific question:
Why is it that when people purchase a home, they say they are "building up equity"?
Every mortgage payment pays some portion of interest, and some portion of the original principal of the loan. The portion of principal that is paid increases the owner's interest in that personal asset (3rd definition, above); i.e., it increases their equity in their home. Once you own your home outright (no mortgages) you have 100% equity in the home.