Hi and welcome to the forum.
Clean the throttle body and pay particular attention to the IAC (idle air control) passages. You may also have a vacuum leak through brake booster.
To test the brake booster, you need to let the car sit with the engine off for a fair while, then put your foot on the brake, if the brake booster is working correctly the pedal should depress as per normal, if the booster has a leak the pedal will be hard (like when you are towing a car). Then pump the brake pedal a few times to deplete any remaining vacuum, put your foot on the brake and start the car, if the vacuum assist is working as it should the pedal will drop.
Sometimes the seal on the shaft fails, if it has you may be able to hear it from inside the car when the engine is running, depress the brake pedal and listen for a hissing/suction sound, it'll pay to turn off all accessories inside the car.