I have canceled the current order like
use Magento\Sales\Model\OrderFactory;
$order = $this->orderFactory->create()->loadByIncrementId($order->getIncrementId());
$order->cancel()->save();
After that, create a new quote and assign the quote item using this link.
https://webkul.com/blog/programmatically-add-more-product-to-an-existing-quote-in-magento-2/
It's working fine. But when the ordered product has 1 qty, it returned the "product is out of stock" message.
How to resolve that.
How to restore the quote for payment failure.
Thanks.