Get Payment Gateway token from the Order in Magento 2 will be useful in the future, if any payment related information needed for that specific transaction.
Vault payment method stores the payment’s gateway token for the order with saving credit card information for the future.
The customer has placed an order from the site with checked Save Credit Card details for the next transaction from the Payment step, Vault store the gateway token for the Payment.

Thanks for the solution.
Can you please elaborate more about it. Where to execute (File) your provided code?