Live car/Dead car

Sometimes, if my 2002 manual transmission Legacy stalls or is shut off for a very brief amount of time it will not start again for at least 5 minutes.

When turning the ignition key, lights come on but, there is absolutely no turn over of any kind…what’s going on?