Most scientific discoveries are attributed to men because women didn't have the opportunity to go into education in the past. They weren't inventing things because they weren't allowed to go to school, they weren't smart because they weren't allowed to be.
I think 'years of inequality' underestimated how long it takes for society and its norms to change. Legal inequality doesn't automatically mean everybody is equal, it takes time. I think a lot of women are still just at the start of their careers, in years to come more women will have secure and influential places in STEM, just need to give them time to get there.
I think men and women have the same potential and drive to be educated and to learn about the world. Curiosity and 'smartness' is inherently human, not inherently male or female. Trying to measure it and turn it into a competition is counter-productive.