2003 Toyota Corolla - Revs high

I have an older 2003 Toyota Corolla with almost 120K miles. When I first start the car, especially on cold days, the engine revs very high (sometimes as high as 3000 rpm) until it warms up. Is there something wrong, or that needs adjusting? I can only imagine how much stress is put on that engine holding such a high rpm for so long. Periodically I’ll tap the gas pedal to make it drop down a bit but it’s short lived… It’ll just climb back up. What’s going on and what can I do? Thank you for any help or insight! -b

I’d start by fixing the reason the check engine light is on. If it is not on I would clean the throttle body.