In WooCommerce> Settings > Products > Inventory page, you can choose how long the system will hold stock for unpaid orders. When the limit you set is reached, the pending order will be cancelled. Or you can leave the field blank to disable it. That is generally not a good idea, because you might find customers put products in the basket and leave – and soon you will have no available stock to sell.
But what happens if you have a variety of methods of payment, for example credit card or cheque or ban transfer? You can’t set a limit of, say, 60 minutes, because that won’t allow enough time for a bank transfer or for a cheque to arrive.
The WooCommerce Cancel Abandoned Order plugin allows you to set specific time limits to hold stock for different kinds of payment.