Africa is ramping up production of oil and gas while positioning itself as a key supplier of critical minerals like copper, cobalt, lithium and nickel needed for electric vehicles and the clean energy shift.