Cost of goods sold (COGS) means just that the cost of the item sold, not purchased

inventory in QB is held as an asset when you purchase it in the inventory asset account, so there is no cost posted COGS

when you sell the item, QB will
post sales to income
lower the qty […]

Resolution for 'account COGS issue: 'Why the expense account linked to inventory items is showing zero balance while the inventory is not?' available: Yes.

The account COGS issue or error code is a known issue in Quickbooks Online (QBO) and/or Quickbooks. Support for this issue is available either by self-service or paid support options. Experts are available to resolve your Quickbooks issue to ensure minimal downtime and continue running your business. First try to resolve the account COGS issue yourself by looking for a resolution described in the article. If it is a complex account COGS issue or you are unable to solve the issue, you may contact us by clicking here or by using other account COGS support options.

For more information about resolving issues related to account COGS in Quickbooks/QBO or to get support for the issue 'Why the expense account linked to inventory items is showing zero balance while the inventory is not?', click the link below: