Sounds like either the battery or the alternator.
If the alternator goes, the car will run on battery power for a while [mine did].
But without the alternator re-charging it, it will fail [did that too].
If the battery goes, the car will be difficult to start.
It may show signs of not having enough electrical power even when running, because the battery may inhibit the flow of current.
In either case, using the accelerator means more current is drawn by the plugs to ignite the mixture, and the car may develop increasingly poor performance or just stop.
The garage can check if the alternator is charging, and they should check it when the engine is warm too, in case a cracked winding opens up under heat.
The garage can also put the battery on a trickle charger to see if its holding a charge.
Both battery and alternator may be fine, but something else may be amiss.
- the battery earth lead may be loose
- the current regulator may be faulty, or
- you can have a short in the wiring loom somewhere.
Motto: leave it to the professionals.