You need to enter a purchase, or initial stock with cost to start with
If you do not there is a bug in QB inventory, see this
Once you have an established average cost the bug will not affect that item. When you sell to a negative on hand (best to avoid doing that) QB will post the current average cost. When you buy more and restock, QB will compare the average cost already posted against the new actual item cost and if there is a difference QB will post an adjustment. You will see that adjustment in the COGS detail part with the word bill as the source.