I think family is very important. I really value the relationships I have with all my cousins. Weddings are a great opportunity to see family members you may never get to see. There will likely be good food, and a fun party as well. Unless you have other plans or commitments, or travel is difficult, or you don’t care for your cousins that much, I see no reason not to go. By not going, you only hurt your relationships with your cousin and possibly others.
I don’t know the Catholic teaching here, but if Catholic teaching says don’t go, I would go anyways, because to me family is more important to me than worries about being in a “state of sin”.
I understand your concern, however, and I hope other people here will give you the full Catholic viewpoint, which I suspect may caution against going to an extent. It just saddens me when people ask questions like this, putting a dark shadow of sin and doom and hell on an otherwise joyous and celebratory wedding.