Sexual intercourse between cousins is considered haram in Sunni Islam as it is a form of incest. Punishment for such acts is the responsibility of the Islamic state, not individuals. To fix the past, you can repent and seek forgiveness from Allah through prayers, acts of worship, and seeking guidance from a knowledgeable Islamic scholar or counselor. It is essential to remember that Allah is the most merciful and forgiving, and you can focus on moving forward with a sincere intention to follow Islamic teachings.