Truth is, everyone alive today either married a cousin or descended from a cousin marriage...if you look far enough into the past. It's just the way that history unfolded.
A non-jargony and brief 2017 article by Dr. Graham Coop, population and evolutionary geneticist at U.C. Davis, provides a good overview: https://gcbias.org/2017/11/20/our-vast-shared-family-tree/.
Our genealogical family trees and our genetic family trees are two distinct things, with some overlap. Throw in the term "genetic similarity"--imagine part of that as being the way the DNA testing companies can even attempt to offer "ethnicity estimates"--and you have a Venn diagram with three circles, portions of which intersect and big portions that do not. Our genetic family tree is much, much smaller than our genealogical family tree.
We might be able to, for example, if we're of European descent be able to draw our pedigree chart--with distinct mothers and fathers--all the way back to Charlemagne in 747 AD, call it about 46 generations ago. At 46 generations, that pedigree chart would show me as having an incredible total of over 70 trillion ancestors (2k where k is the number of generations). We can't know the numbers for certain, but speculation is that at the time of Charlemagne the total population of Europe was between 25 and 30 million, of which about half was within Charlemagne's Carolingian Empire. The entire global population was somewhere around 220 million. So my pedigree chart would show over 318 thousand times more more ancestors at that time than was the number of all humans alive. Nope.
Our genetic family trees collapse much, much more quickly than most of us realize. Looking at Coop's nifty illustration in his article, and if we assume no known cousin marriages at all in recent generations, by the 9th generation these unrelated individuals start to share common ancestors, five of them, in fact. By the 10th generation, they share 18 ancestors. By the 11th generation, they share 61 ancestors; by the 12th generation, 261; by the 13th, 1,025, and many of those appear more than once in the genealogy.
In an interesting coincidence, I just exchanged email with another WikiTreer who noted that we were distant cousins. I hopped over to the relationship finder and, sure enough, it showed our closest relationship as 15th cousins 1x removed. But it also showed that the tree had us as sharing 206 common ancestors. Given that genealogies get very iffy back beyond the 16th century or thereabouts, that's pretty much in keeping with Coop's numbers.
I need to set aside time today or tomorrow to finish a brief article about new research published a few days ago that rewrites some of what we thought we knew about the repopulation of Europe following the last major ice age. The previously prevailing hypothesis was that hunter-gatherers who had migrated into Eurasia from the Near East circa 33,000 YBP, collectively known as the Gravettian culture, mostly vanished in the Last Glacial Maximum, wiped out as massive ice sheets began descending upon Europe around 25,000 YBP from the north, destroying their food sources from plants and game populations. The new discoveries via DNA show that the Gravettians in the area of southern France and the Iberian peninsula survived, that many Europeans carry those genetic signatures today. But the Gravettians farther east, specifically in Italy, did not, and were replaced by a different and genetically distinct hunter-gatherer population from the Balkan peninsula after the ice sheets retracted and allowed humans to begin repopulating Europe circa 17,000 YBP (Posth, et al., Nature, March 2023; Villalba-Mouco, et al., Nature Ecology & Evolution, March 2023).
Point being that our entire history has seen periods of both population contraction and expansion, of bottlenecks that constricted the available number of procreating humans and of times that climate and available resources allowed population booms. And every one of those bottlenecks--whether from disaster, geographic isolation, migrations by relatively small groups, or even endogamy as a social practice--meant that the genetic family trees collapsed during those periods. But as a species we've always recovered...to the point that we now have a staggering global population of about 8.02 billion. But even that's a drop in the bucket compared to the 70 trillion ancestors I would have had--on a tidy, org-chart-like family tree--during the reign of Charlemagne.
Without a whole lot of cousin marriages, we'd never have gotten here from there! 