engine rpm races up to above 2000 when car started, then settles off in a few minutes 2008 bmw x5 3.0si
This is probably normal, especially in colder weather.
The electronic throttle body controls the engines idle speed.
Try cleaning the throttle body.
There are a couple of reasons why the engine runs at higher RPM for the first couple of minutes, but above 2000 sounds a bit higher than I would expect. Remember that it is a drive-by-wire throttle so if you clean it, do not push the throttle plate open with your finger. Turning the key to the on position and propping the throttle pedal should open the butterfly for you so you can spray through.