DId you purchase it using a payment app on your phone? Or a credit card that you have its app installed on your phone? prescription insurance app? Swipe any points card with that purchase?
Did you get an email receipt for it? These are some of the DIRECT ways this could have happened.
The indirect ways are more numerous, such as location information, activity information, heart rate, sleep pattern, fast food diet, music choices correlation and things we cant even imagine.