Wash the mushrooms well, then trim off the stem ends (leave the stems in place unless they look a bit withered). If any of the mushrooms are much larger than others, halve them through the stem end.
In a medium heavy-bottomed saucepan or small Dutch oven, add the mushrooms. Drizzle the oil over the top, then cover, set over medium heat, and cook without stirring until you hear sizzling, 2 to 3 minutes. Uncover, season with the kosher salt and a few grinds of pepper, and give the mushrooms a stir. Put the
garlic and thyme on top, then cover, turn the heat to low, and let the mushrooms gently steam without stirring for 12 minutes.
Uncover and check the texture of the mushrooms. If they are still firm and there isn’t much liquid in the pot, cover and continue to cook for 3 minutes more, then check again. If the mushrooms are soft, leave them uncovered, increase the heat, and simmer until most of the water has evaporated, 1 or 2 minutes. Remove from the heat and stir in the vinegar. Transfer the mushrooms to a bowl and let cool to room temperature. Store in an airtight container in the refrigerator for up to 1 week. Serve at room temperature topped with pinches of flaky sea salt and more pepper, if desired.