Preheat and prep: Heat your oven to 350°F (175°C). Grease a 9x9-inch or 7x11-inch baking dish with cooking spray or butter.
Sauté the mushrooms: Heat a large skillet over medium heat.
Add olive oil and 1 tablespoon butter. When hot, add mushrooms with a pinch of salt. Cook, stirring occasionally, until they release their moisture and turn golden, about 7–9 minutes.
Add aromatics: Stir in the diced onion and cook until soft, 3–4 minutes.
Add garlic and cook 30 seconds more. Turn off the heat. Stir in half the thyme or parsley if using.
Whisk the egg mixture: In a large bowl, whisk eggs, heavy cream, 1 teaspoon salt, and 1/2 teaspoon black pepper until smooth and slightly frothy.
Assemble: Spread the mushroom mixture evenly in the baking dish.
Sprinkle half the Swiss cheese over the top. Pour the egg mixture over everything. Top with the remaining cheese.
Dot the top with the remaining 1 tablespoon butter for extra richness.
Bake: Place on the center rack and bake 25–35 minutes, until the center is just set and the edges are lightly golden. A knife inserted in the center should come out mostly clean.
Rest and garnish: Let the omelet bake rest 5–10 minutes. This helps it set and makes slicing easier.
Sprinkle with remaining herbs and a pinch of red pepper flakes if you like.
Serve: Slice into squares and serve warm. Add a simple side salad or sliced avocado for a complete meal.