Stock Purchase vs Asset Purchase

From Knowledge base

A "stock purchase" means buying a company's shares, which gives the buyer ownership of the entire company, including all its assets and liabilities, while an "asset purchase" involves buying specific assets of a company, allowing the buyer to choose which assets they want and potentially avoid taking on certain liabilities; essentially, with a stock purchase you buy the whole business, while with an asset purchase you only buy selected parts of it.