Why does my car die when I slow down or come to a stop?
The only wild guess I can give you is your idle air control valve has failed. Since you didn’t tell us anything about the car, that is my best guess
I’d also guess you don’t know what that device is or even where it is in your car. Take your car to a good local independent mechanic and tell them exactly what you told us. Don’t just tell him to replace the idle air control valve as I might be wrong. The mechanic can then check which engine you have, note the miles on the engine, check with his scan tool and identify the part that has gone bad and replace it so your problem will be solved.