My car wont crank and start but the lights and battery is working
Is it making any sounds (single click or fast clicking)? Check the battery voltage. It should be 12 - 12.4 volts at rest. When you try to crank the engine, does it go below 11 volts? If so, low or bad battery. Check and clean the battery terminal connections.
It's a dead or dying battery; you might have enough juice to light the lights, but not enough to turn the starter motor. Jump start the car properly; leave donor hooked up long enough to charge your battery, at least ten minutes. If your car starts, fine. If it does not start, replace your battery. After either of these, go to an auto parts store and have any codes read. They may point you to the reason your battery died; possibly a dead alternator.