<?php
namespace Yuvraj\Raulji\Block;
class Demo
{
public function __construct(
\Magento\Quote\Api\GuestCartManagementInterface $guestCart,
) {
$this->guestCart = $guestCart;
}
/* Create Guest Cart */
public function createEmptyCart() {
return $this->guestCart->createEmptyCart();
}
}
Call createEmptyCart function and you can create automatically quote for guests.
Once you run the above code new quote entry generated in a database table.