Good question. I suspect genetics leads to tendencies that are reinforced or curtailed by learning/training.
I think a lot of studies of male/female differences don’t go far back enough.
They stop at 2- many of them. And by 2, a child has already absorbed a whole bunch of the cultural expectations around them, including some of the gender differences, based on the things we say to them and what they see.
At the same time, despite training, natural (genetic) tendencies sometimes hold a stronger sway for the individual.