A bad crankshaft sensor can cause a car to quit running and not start back up. The crankshaft sensor is responsible for detecting the position of the crankshaft and sending this information to the engine control unit (ECU). The ECU uses this information to control the timing of the fuel injection and ignition. If the crankshaft sensor is not working properly, the ECU will not be able to control the engine timing correctly, which can cause the engine to stall or run erratically. In some cases, a bad crankshaft sensor can also prevent the engine from starting at all.
If you suspect that your car's crankshaft sensor may be bad, you should have it diagnosed by a qualified mechanic. If the sensor is found to be faulty, it will need to be replaced.