BYD were early adopters of the electric vehicle(they already dominated electric buses, having plants in the USA and Europe 10 years ago).
The rest of the car industry was sleeping on electric, while BYD made it their sole focus. That s why they're now eating everyones lunch.