In the wake of the Iran war, prices are surging for critical elements used in defense and the semiconductors that power artificial intelligence advances.