You can look at the ASVAB test used by the military since 1968. One of the categories of the first iteration of the test was space perception. Studies of ASVAB results between men and women have found that men score higher on the composite technical aptitude score even at lower general intelligence than women.
The reality is that men have been observed to have, for whatever reason, higher proficiency at spatial reasoning than women long before video games were a thing. To say that 3d video games played by boys and men has led to boys and men being better at spatial reasoning is fallacious when it's known that this existed before video games were broadly available. It also is logical to see that video games that play into the strong suit of men and boys is going to attract more men and boys.