Car stalling while idling could be an actuator failing that sends a signal to the throttle body to make it idle.
Could also be an EGR valve clogged, an EGR valve hat is clogged can cause a car to sputter, idle erratically.
Also check your idle set screw on the throttle body to make sure it hasn't been moved to where the throttle body butterfly is closing too much. It should be open a little bit at idle.
I'd recommend taking the car to a shop to have them personally look it over as they can tell a lot better than someone over the internet.
All we can do is guess unless we see the car.