A better-than-store-bought stock that won't take all day.
Either using a medium-sized frying pan over medium-high heat or the bowl of an 8-quart Instant Pot using the sauté function, heat the olive oil until it ripples. Cook the onions, cut side on the skillet, until they are fragrant and golden brown, about 3 to 5 minutes. Set aside.
In the same skillet or in the bowl of the Instant Pot set to sauté, cook the mushrooms until they brown and are just starting to release their liquid.
Transfer the mushrooms to the bowl of an Instant Pot if they aren't in there already. Add onions, water, garlic, peppercorns, and salt, if you're using it. Set the Instant Pot to pressure cook on high for 45 minutes.
Let the pressure release either manually or naturally. Strain the stock and cool.