Add the garlic, mushrooms, thyme, and rosemary. Cook, stirring occasionally, until the mushrooms release their liquid and start to brown, about 5 to 7 minutes.
Press Cancel. Add the rinsed barley, vegetable broth, water, salt, and pepper to the pot. Stir well to combine everything.
Secure the lid and set the vent to Sealing. Select Manual/Pressure Cook (High Pressure) for 20 minutes.
When the cooking cycle finishes, allow a Natural Pressure Release (NPR) for 10 minutes, then carefully turn the valve to Venting to release any remaining pressure.
Cook for 1 to 2 minutes, stirring, until the soup thickens to your desired consistency. Serve hot.
Notes
Rinsing the pearl barley removes excess starch, which helps prevent foaming during pressure cooking.
For a thicker soup without using cornstarch, remove about 1 cup of the cooked soup (mostly mushrooms and broth) before adding the cream, blend it until smooth, and stir it back into the pot.
You can substitute hulled barley, but you must increase the pressure cooking time to 35 minutes with a 15-minute NPR.