To cancel the shipment, move towards the WooCommerce panel and click on the Orders tab.

Go to the WooCommerce panel, click on the Orders tab.
On clicking the ordered product, your ordered details will be visible.
You will see the Cancel Shipment tab just below the tracking number on the right side of the page.
On clicking the Cancel Shipment, your shipping will be canceled.