In the case of the US, they've been maintaining assured supply chains fully sourced in the US for several decades so they've been able to bootstrap it. It is one of the reasons a domestic manufacturer exists for every kind of computing even though most has moved to Asia. It isn't a coincidence, for example, that Micron is based in Idaho.
Bootstrapping that from scratch today would be slow. The more feasible path is to use an existing assured supply chain to bootstrap initial capability and then swap out those bits with your own.