Cost of Goods Sold (COGS) measures how much a company spent on a product or service, including any cost necessary for their final production. The purpose is to estimate the cost of items sold and it helps monitor the performance of the company.
Take a look at the video below by the Corporate Finance Institute about COGS:
Source: "What is Cost of Goods Sold (COGS)?" on corporatefinanceinstitute.com