Try this way to fetch the correct token of the user
<?php
namespace Vendor\Module\Controller\Index;
use Magento\Customer\Model\CustomerRegistry;
class Test
{
const PATH_RESET_PASSWORD='customer/account/createPassword/?token=';
public function __construct(
CustomerRegistry $customerRegistry,
\Magento\Store\Model\StoreManagerInterface $storemgr
)
{
$this->customerRegistry = $customerRegistry;
$this->_storeManager= $storemgr;
}
public function execute()
{
$Token=$this->customerRegistry->retrieveSecureData('CustomerId i.e 3')->getData('rp_token');
echo "link::<br>".$this->_storeManager->getStore()->getBaseUrl().self::PATH_RESET_PASSWORD.$Token;
}
}
if this doesn't work then try to increase Recovery Link Expiration Period from configuration.