01 - Heat olive oil in a large skillet over medium heat.
02 - Add sliced onions and cook, stirring occasionally, until they begin to soften and turn golden, about 15 minutes.
03 - Sprinkle brown sugar over the onions and stir to coat evenly.
04 - Add balsamic vinegar, salt, and pepper. Reduce heat to low and cook, stirring occasionally, until onions are deeply caramelized and the glaze is thick, 15–20 minutes more.
05 - Stir in fresh thyme if using.
06 - Serve warm as a side dish or topping.