Actually, it’s pretty unlikely that they even realized that there was a connection between sex and reproduction.
It takes a bit of knowledge of biology to understand this. Many cultures, even fairly recent ones that were quite a bit more advanced than cavemen, did not understand the connection.