Hello and thank you for using Just AnswerI'm Paul and I will help you with your Question
does it run rough when it cuts off?
or does it run smooth and just turn off like the key was shut off?
does it happen warm or cold? does it restart right away? or do you need to wait
please give as much detail as possible
if it runs smooth and just stalls at times I would replace the Mass Air Flow sensor
it is a very common cause for stalling and will restart right away
other common issues that cause stalling generally cause the engine to run rough and be hard to restart
replace the Mass Air Flow Sensor
Also clean the throttle plate
let me know if you need more help
No problem thank you for using Just Answer