Preheat oven to 450°F (230°C) and place a rack in the center.
Pat the beef tenderloin dry with paper towels.
Brush olive oil over the beef and season with salt and black pepper.
Mix garlic, rosemary, thyme, butter, Dijon mustard, and optional crushed red pepper to form a paste.
Spread the herb-garlic paste evenly over all sides of the beef.
Place the beef on a roasting pan or baking sheet with a rack.
Roast for 25–30 minutes, or until the internal temperature reaches 125°F (52°C) for medium-rare or 135°F (57°C) for medium.
Remove from oven and tent loosely with foil. Let rest for 10–15 minutes.
Slice into medallions and sprinkle with flaky salt if desired.
Serve with sides or sauces such as horseradish cream, red wine reduction, or herb compound butter.