01 - Preheat the oven to 400°F. Line a baking sheet with parchment paper.
02 - Heat butter and olive oil in a large skillet over medium-low heat. Add sliced onions, salt, and sugar. Cook, stirring frequently, for 25–30 minutes until onions are deep golden brown and caramelized. Stir in thyme and black pepper during the final 5 minutes of cooking.
03 - While onions caramelize, unroll the puff pastry and cut into 6 equal rectangles. Place on the prepared baking sheet. Using a sharp knife, score a 1/2-inch border around each rectangle, being careful not to cut completely through the dough.
04 - Brush the scored borders of each pastry rectangle with beaten egg to promote golden browning.
05 - Divide the caramelized onions evenly within the borders of each pastry rectangle. Top with crumbled goat cheese, distributing evenly among all tarts.
06 - Bake for 15–18 minutes until pastry is golden brown, puffed, and crisp, and the cheese has softened.
07 - Remove from the oven and sprinkle with fresh chives or parsley if desired. Serve warm or at room temperature for optimal flavor.