The method of extraction of a metal depends on its position in the reactivity series
If the metals are more reactive than carbon:
They have to be extracted using electrolysis
As they are too reactive and cannot be reduced by carbon
If the metals are less reactive than carbon:
They can be extracted by heating with carbon which reduces them