Google parses and collects purchase history (purchases, subscriptions, reservations) from Gmail.
See https://support.google.com/accounts/answer/7673989, or go to https://myaccount.google.com/purchases, https://myaccount.google.com/reservations, https://myaccount.google.com/subscriptions.