Preheat and prep: Heat the oven to 400°F (200°C). Pat the pork tenderloin dry with paper towels.
Trim any silver skin. Season all over with 1–1.5 teaspoons salt and 1/2 teaspoon pepper.
Sear the pork: Heat a large oven-safe skillet over medium-high. Add 1 tablespoon olive oil.
Sear the pork on all sides until deeply browned, about 6–8 minutes total. Transfer the pork to a plate.
Cook the mushrooms: Return the pan to medium-high. Add remaining 1 tablespoon olive oil and the butter.
Add mushrooms and a pinch of salt. Cook, stirring occasionally, until they release liquid and turn golden, 6–8 minutes.
Build the flavor: Add the chopped onion or shallots. Cook 2–3 minutes until softened.
Stir in the garlic and thyme (and rosemary, if using). Cook 30–60 seconds until fragrant.
Deglaze: Pour in the wine (or 1/2 cup broth). Scrape the browned bits from the bottom of the pan.
Let it bubble and reduce by about half, 2–3 minutes.
Add broth and return pork: Stir in 3/4 cup broth and Dijon mustard. Nestle the seared pork back into the pan over the mushrooms.
Roast: Transfer the skillet to the oven. Roast until the pork reaches an internal temperature of 140–145°F in the thickest part, about 12–18 minutes depending on thickness.
Rest the meat: Move the pork to a cutting board and tent loosely with foil.
Rest 5–10 minutes to keep it juicy.
Finish the sauce: Place the skillet back over medium heat. Stir in the cream (if using). If you’d like a thicker sauce, whisk 1–2 teaspoons cornstarch with 1 tablespoon cold water, then stir the slurry into the pan and simmer 1–2 minutes until slightly thickened.
Adjust seasoning with salt and pepper.
Slice and serve: Slice pork into 1/2-inch medallions. Return slices to the pan to coat in sauce or plate the pork and spoon mushrooms and sauce over the top. Garnish with parsley.