Start by heating the olive oil in a large skillet over medium heat. Add the thinly sliced onions, stirring them gently to coat with the oil. Cook for about 10 minutes, stirring occasionally, until the onions begin to soften.
Reduce the heat to medium-low and continue to cook the onions for another 30-40 minutes. Stir them every 5-10 minutes. You want them to turn a deep golden brown and develop a sweet, rich flavor. Patience is key here!
Once the onions are beautifully caramelized, stir in the balsamic vinegar, brown sugar, chopped rosemary, salt, and black pepper. Mix well, ensuring the onions are well-coated with the mixture.
Allow the mixture to simmer for an additional 10-15 minutes, stirring occasionally. This will help the flavors meld together and create a syrupy consistency. If it seems too thick, you can add a splash of water.
Once the jam has reached your desired consistency, remove it from the heat and let it cool. Transfer the Balsamic Rosemary Onion Jam into a clean jar or container. It can be stored in the refrigerator for up to two weeks.