Hi....welcome to the Club
Two things come to mind...
1. Crankshaft Sensor which looks for rotation of the crankshaft which will signal the Engine Management System (EMS) and give the command to fuel and spark dependent on engine speed. If this is faulty (usually when hot and the resistance changes) then this can cut the engine and start when cooled down.
2. Throttle Body adaptation which is adjustable using a scan tool. A lot of times this comes down to carbon build up and benefits from cleaning which gives a constant smooth idle speed
A scan of the EMS should give stored fault codes which lead to a more precise diagnosis
Let us know how you get on with it all