Cost / average cost / warehouse price is how stock is valued. Default method: weighted average.
On goods receipt confirm: new average = (old stock × old avg + qty × purchase unit cost) / new stock.
Extra costs on the receipt: allocate by value / equally / quantity → New warehouse price = purchase price + cost per unit; then average is re-blended.
Draft receipts do not change cost and create no journal. Confirm updates average cost and creates the journal entry (cost > 0). Details: Goods receipt.