In a large saucepan, heat the olive oil over medium heat. Add the chopped onion, smashed garlic cloves, rosemary sprigs, and ¼ teaspoon of kosher salt. Cook while stirring occasionally for approximately 6 minutes, or until the onion has softened and the mixture becomes fragrant, ensuring that the onion does not brown.