Everyone else. Tesla's market cap is essentially the same as Toyota, BYD, Porsche and Volkswagen combined. That is based on the assumption that they will grow to dominate those companies, so that's the competition. BYD is probably a special case, so you can substitute BMW and Honda in for BYD.
Tesla basically had first mover advantage and got to where they are because the rest of the industry was slow to pivot to electric. That's changed. The industry seems to have figured out that electric is the future, and they're ramping up. Tesla is a technology company that makes cars and they're going to have to compete with car companies that merely need to adopt technology. Electric motors and chemical batteries aren't a niche field.
Apple is going to face the same problem if they think cars are going to be the next big thing for them. There are a minority of buyers that get excited by car tech, but most of them just want to buy something that will reliably get them to and from work for the next 10 years.