The first sentence would be more natural to me with for instead of of. Either way, it doesn't need an article either, but is more natural with it.
There are rules you can learn that give you a clear idea of when you must use an article, and when you mustn't, but there's a lot in between - where it's strictly optional, or where it changes the meaning in subtle or not-so-subtle ways.
A major difference between your two phrases is the way in which the noun phrase related to extracting minerals is constructed. In one, you refine extraction with a preposition, of. I would say this is having a genitive role in this case (though the different roles of of can be subtle to distinguish), meaning that it is broad equivalent to "minerals' extraction". The second case uses an attributive noun to refine extraction, indicating that it is concerned with minerals (attributive nouns are generally in the singular regardless of other considerations).
If you use a definite article in the case using an attributive noun, you would be referring to a specific case of mineral extraction. If you used an indefinite article, you would be referring to a single but non-specific case of mineral extraction. Without an article it is broader. Because there's an indefinite article in front of the whole thing, "a method", you end up with something quite complex. With "a method of the mineral extraction", you might be talking about a specific situation regarding mineral extraction (say, extracting a mineral from a given mine), where there are potentially several methods.
The use of a definite article in the first example is a pattern you see with action nouns, and I don't think it has any particular meaning. The, or no article, is used when you are talking about extraction in general; an extraction would mean a single event where something is being extracted. For example, when making an appointment at the dentist you might tell the reception "I need to make an appointment for an extraction", while a dentist learning about it might have a lecture on "the extraction of teeth", or just "extraction of teeth".