In WooCommerce, used the plugin WC Cancel Order to implement the functionality Cancel Order for COD as well. But when any user requests cancellation, and even after it has been approved by the admin, the product quantity will not restore.
There are two ways to resolve this
If you want to use plugin then this will work for you Plugin
Or you can use WC Cancel Order