That will depend on what you are using. What plugin are you using to create this stock?
On the WooCommerce order page within wp-admin there is a “Order Notes” field. One of the notes is the product and the quantity that has been reduced from the stock. Where is that snippet of code that queries that amount?
I’m unable to verify ATM, but the value ought to be in the product’s post meta. If you can determine the proper key, you can get the value with get_post_meta(). Try searching with phpMyAdmin to find the right key. There’s possibly a more structured way through WC code. If you prefer that way, try asking in the WC dedicated support forum.