Others have already explained it, but digital ads are generated by google/facebook/etc (not websites) basesed on an information trove that sounds straight up tinfoil hat conspiracy theory levels if described. Rather than describe it I'll show a recent example
Signal's campaign allegedly resulted in the disabling of the encrypted messaging service's Instagram account.
www.cnet.com
Plus a related example from like fifteen years ago where target started predicting pregnancy before the family knew..
Target has perfected the technique of analyzing consumers' shopping habits to figure out who's pregnant. How can they send customers congratulatory coupons without freaking them out?
www.forbes.com
Not only are everyone's ads their own fault, or the fault of someone they share a computer with, they are the result of Google having a better understanding of you than you yourself probably have on the topic of self understanding.