US President Donald Trump has invoked wartime powers to boost production of critical minerals.