Engine just died

Okay so I came home from work today, which is about a 20 mile drive. My car seemed just fine until I was about 1 mile from home and I could feel something going wrong. I was pushing the gas pedal down but my car would not go. Finally the engine just shut off. I tried to crank it over, but it would not start. The engine would almost start but I have no idea what could be wrong. If anyone could help it would be greatly appreciated

A MILLION things could be wrong. But starting at the top of the list, your fuel pump failed… If it will momentarily start after a shot of starting fluid, fuel pump failure just jumped into the lead…

I have an Olds Alero…2000 model.

Let me guess. Your fuel gauge says you have more than 1/4 tank, but less than 1/2 tank…

Is that a correct assumption?

You have no idea what’s wrong, since you tell me almost nothing about the car, I have no idea either.

First guess is a dirty fuel filter. Then, I would test the fuel pressure, with a fuel pressure test gauge, at 2000 rpm with the transmission in DRIVE.
You can try, in vain, to work around doing the fuel pressure tests…like, just changing the fuel pump, as a wild assumption, or, you can do the tests.