Season the steak. 30 minutes before you plan to cook, remove the tenderloin piece from the fridge. Pat really well all over with paper towels to remove excess moisture and season all over with salt and coarsely crushed peppercorns and leave about 2 teaspoons of peppercorns for the sauce. Let the steak sit uncovered for 30 minutes.
Preheat oven to 400 F.
Sear the steak. Heat 2 tablespoons of neutral high-temp oil in a stainless steel or cast iron skillet over medium-high heat. Once the oil is very hot and shimmering, carefully place the steak in the skillet. Sear all over, including the ends, until deeply golden brown.
Baste the steak. Add the butter, garlic, and thyme to the pan. Once the butter is melted, baste the steak with the melted butter for 2-3 minutes.
Transfer to the oven. Insert the probe of the meat thermometer into the thickest part of the steak and transfer the whole skillet to the oven. Cook until the temperature reaches 120-130 F (depending on preference) and remove from the oven. Transfer the steak to a cutting board and loosely tent with foil.
Make the sauce. Discard the garlic and thyme and return the skillet to medium heat on the stove. Add the minced shallot and cook until softened, using a silicone spoon to scrape up any browned bits from the skillet. Add the cognac and carefully tilt the pan until the cognac ignites. Let it burn, swirling the skillet occasionally, until the flame goes out. Add the remaining peppercorns and heavy cream and simmer for 1 minute. Add the bit of sherry vinegar, if using. Season to taste with salt.
Slice and serve. Slice the steak, sprinkle with flaky sea salt, and serve with the pan sauce immediately.