Let me share information about tracking your inventory in QuickBooks Online (QBO).
When making a sale for an Inventory item, the item cost at the moment of the sale is recorded Cost of goods sold (COGS). This offsets the decrease in your Inventory asset account, and the other accounts affected will be an income account as well as the Accounts receivable account. If the sale is done using a Non-inventory item, only the last two account types will be affected in the sale as the inventory is not tracked.
Additionally, COGS depends on the purchasing transaction's cost. If you haven't entered an expense for the inventory item, COGS will show a zero amount when added to the invoice. Then, if there's no initial cost on the inventory item, there's no amount on COGS when sold.
To know more about how the Inventory feature works, see the below articles for further explanation: