The throttle body assembly may need cleaning, quite easy to remove and clean with Carb Cleaner and reinstall.
Alternatively, you can reset the Throttle with a scan tool and also worth checking the throttle pedal connections to ensure they are clean and secure
All of the above can affect the idle speed which may be what is occurring.