Oil light on then off then CAR DIES

It’s a 2000 with 90k on it. What I mean without notice is the car started each time without any problems or noise. No engine knocks etc. The samething happened a few years ago and it was a dead battery. Oil light didn’t come on though. this all happened within a span of a few hours.