How do critical minerals influence a country's national security?

I want to understand why critical minerals are considered important for national security and how their availability or scarcity can impact a nation's defense and strategic interests.