In either case, you're responsible for associating a transaction's payment source(s) with the customer and/or the checkout. For more details, refer to:
If you provide registered customers the ability to save their payment methods for use in future transactions, you'll need to give them access to a self-service account management portal. A section of this portal should allow customers to add, delete, and update their payment methods.