Automakers Thrived in the Pandemic. Many Are Now Struggling.