Short answer
Do the dry part first, then the wet part. Scoop up the solids while they are still dry, then dampen what is left with cold water and blot it.
Why dry first
Wet vomit spreads when you scoop it. Lifting the solids dry keeps the mess in one place and reduces how much you push into the pile.
Why dampen after
Once the solids are gone, a little cold water helps loosen the residue so an enzyme cleaner can reach it. Use just enough water to wet the spot, not enough to soak it.
Why not soak it
Soaking can spread the stain and carry residue deeper into the backing, where it is harder to remove and may hold odor. Blot gently instead of rubbing it in.
Dried vomit is a different case
If the vomit has already dried, rewet the area with cold water to soften it before you lift the residue. Then apply an enzyme cleaner and repeat as needed. Dried vomit usually takes more rounds than a fresh spill.
Yellow vomit
Yellow or greenish vomit often contains bile, which can leave its own tint. Bile can be harder to lift, so give it extra time and treat it with the same patient approach. For the specific stain, see removing bile stains from carpet.
Drying afterward
Once the spot is clean, blot out the moisture and let it dry fully. Use airflow, and keep pets and foot traffic off until it is dry. Damp carpet can hold odor and encourage mold.
If you’re planning a full clean, the drying timeline matters, and how to properly dry carpet after steam cleaning is a useful follow-up.
Before a machine clean
If you plan to run a machine over the area later, what to do before steam cleaning carpet covers the steps that come first. Cleaning the spot by hand before a machine pass usually makes the machine’s job easier.
The short version
Scoop the solids dry, dampen with cold water, and blot without soaking. Dried vomit needs rewetting and more time. Let the carpet dry completely before you walk on it.