History I have never researched, especially after working in the metal-working industry for over 43 years (and my father before me) and I have never asked this question-“ When and how did humans EVER get the idea to mine ores for metals?”
Not to speak about refining and alloying....
That's a good question! The availability of copper in an already usable form probably explains how copper came into use in the transition from Neolithic to Chalcolithic to Bronze Age. The manufacture of bronze is complicated though, and just for laughs I'd attribute that development to an unknown ancient craftman who was on the autistic spectrum.