Tesla is not the only company building out battery factories and investing in R&D. Not by a long shot. Volkswagen Group alone is investing about $10B per year which is far more than Tesla. They're not going to be vertically integrated like Tesla is, but they are spending a significant amount of money to ensure they have an adequate supply chain and battery technology. Then on top of that you have billions from other companies like Ford, Rivian, etc. to establish supply chains with companies like Panasonic and LG Chem.
Tesla did the hard work of proving EVs can be done. Now that that's been done, it's going to be a lot easier for other companies to catch up. Especially VW Group with its tens of billions of dollars to throw into R&D and supply chain acquisition.
Sandy Munro is a good resource for not just what different companies are doing in the EV world, but also how their corporate cultures are dealing with the shift. He has been critical of Tesla's "dinosaur tech" ie bending metal, but he's very impressed with other areas of Tesla tech.
Traditional car companies farm out design and production of most subsystems and even those done in house are done by separate teams that never talk to one another. He found in his Tesla teardowns that that obviously isn't the case with Tesla. He pointed out a fluid bottle that is used by several different systems in the car and he said no other manufacturer would do that because no other manufacturer has that level of coordination between departments.
He also is very impressed with Tesla's electronics. He has pointed out that the design and manufacturing of the electronics in Tesla's cars is at least one generation ahead of the rest of the car industry. In many cases several generations. Tesla's electronics is on par with the latest electronics being developed for the Department of Defense.
Several car companies are beginning to spool up battery production and they can copy some of Tesla's ideas learned from teardowns of Teslas, which does speed up their time to production. However, they are also slowed down by developmental processes that have been evolving for 100+ years. Large, well established companies don't move very quickly. Before the current era of large, established companies eliminating competition by buying them, medium sized companies that are still young enough to innovate, but big enough to take on large projects had an advantage over the old dinosaur.
Some companies have slipped past the old behemoths and managed to become big companies like Microsoft, Apple, Google, etc. Tesla is the next of these. They survived the early stages when they might have been bought out by a legacy car maker to become a medium sized nimble company with the newest tech at a time the industry is about to go through some massive changes.
Tesla also has some advantages in ways the legacy car makers have not figured out yet. Supercharging being the biggest of these. Legacy car makers consider "fuel" to be somebody else's problem and they don't want to deal with it. They are involved in charging standards, but letting governments and the market settle the details. The result has been a balkanized charging environment that is hopelessly confusing to most consumers used to every gas station basically being the same.
Tesla has made supercharging convenient and painless. If you're on the road, the only concern you have with supercharging is what you're going to do while the car charges and the occasional problems with crowded superchargers or dead superchargers. And they try to give you some information to plan ahead with supercharger problems.
With other charge networks you usually don't know until you get there if it's in use or down. And paying for charging can be a hassle because each network does it differently.
Other car makers will make compelling EVs and some will sell quite well, but I think Tesla is going to remain the top of the pack for some time to come. There may come a day when they get complacent and lazy and a competitor catches them out, but it will be a while.