Tesla on Wednesday reported a sharp drop in profit for 2024 as rivals in China, Europe and the United States chipped away at its lead in the market for electric vehicles.