It's repeated marriages within a small gene pool that's the issue, not isolated marriages between cousins.
That said, obviously if something is legal, you increase the chances of it remaining prevalent.
Personally, I don't have any squeamishness about cousins marrying. I am not close with my first cousins at all, and I just don't register the kind of taboo that some people were brought up to have. I don't find them remotely attractive - in the nicest possible way, I mean! - but I don't feel revolted when I hear of someone else marrying their cousin.
I do slightly judge people who express revulsion at that, TBH. Especially those who don't realise it's legal.
I think if we were to make it illegal to marry your cousins, that would be totally fine. But it would be much more effective to spend the money necessary to sort out the legal changes, in shifting perceptions within communities that it's important to marry within a close network. I'd much rather see two first cousins from a genetically diverse family choose to marry, than second or third cousins feeling pressured to marry each other because that's how their family has always done things. And that's not just about genetics, it's about the mindset that goes along with encouraging people, generation by generation, to keep marrying within their community group.