When Kunti revealed this secret about Karna, Yudhishthira was deeply hurt! Then, in anger, he pronounced this terrible curse on women

After the end of the Battle of Kurukshetra, the Pandavas were victorious, but  the cost of this victory was so great that mourning spread throughout Hastinapur. Everyone was saddened and distressed by the pain of losing loved ones. Meanwhile, as the Pandavas were offering water to their deceased relatives on the banks of the Ganges, Kunti revealed a secret that shook the entire world of the five Pandavas, including Yudhishthira. Kunti said that the person whom they had considered their greatest enemy all their lives was none other than their eldest brother, Karna.

When Kunti Revealed the Secret
According to the Stree Parva of the Mahabharata, while offering water to the fallen warriors, Kunti revealed to the Pandavas that Karna was actually her son, whom she had received as a boon from the Sun God before her marriage. He had possessed a divine armor and earrings since childhood. However, being unmarried and fearing public shame and circumstances, she placed the newborn Karna in a box and floated him in the river. Later, Adhiratha and Radha raised him.

The very Karna they fought was their own brother.
Hearing Kunti's words, the Pandavas were stunned. This was the greatest shock for Yudhishthira. Karna had died on the battlefield at the hands of Arjuna, and he was saddened by the fact that he was his own brother. Yudhishthira lamented that Karna's death was more painful to him than the deaths of Abhimanyu and Draupadi's sons. Yudhishthira even offered water to Karna, considering him his own brother.

Kunti also tried to persuade Karna
before the battle, claiming he was her own brother and offering him to fight on the Pandava side. Suryadev also tried to persuade Karna. But Karna remained unwavering in his friendship and loyalty to Duryodhana.  

Yudhishthira, enraged, cursed women.
Hearing his mother's words, Yudhishthira was so distressed that his grief turned to anger. In this pain and anger, he cursed the female gender, saying that no woman would ever be able to keep a secret.

Karna's reign became a lifelong pain for the Pandavas.
After Karna's truth was revealed, the Pandavas felt a sense of brotherhood for him, but it was too late. The war was over and their eldest brother had been killed by them.

PC: Hello