Heat the olive oil in a large skillet over medium-high heat. When the oil is shimmering, add the onion, season with salt and pepper, and cook, stirring, until translucent, about 4 minutes. Add the garlic and cook until fragrant, about 30 seconds. Add the Brussels sprouts and a pinch each of salt and pepper and cook until soft, about 4 minutes. Stir in the rosemary and season with more salt and pepper as needed.