A Tesla factory in Fremont, Calif. A global shortage in semiconductors — a crucial component in cars and electronic devices — has forced several major American auto plants to close or scale back production.Credit...Justin Kaneps for The New York Times