Ignition switches can cause your car to stall suddenly or never even start. There are some manufacturer defects that cause electrical components to fail at start or even a problem with the connections to your battery. in some cases, it could also be your key.
Sometimes keys wear out or break, and if you have an electrical key such as a push-start, your transponder may have broken or suffered a defect. The good news is that most of these issue are covered by your warranty on a new vehicle.