Heat olive oil in a cast-iron skillet over medium-low heat. Add garlic and stir until golden brown and fragrant, about 2 to 3 minutes. Add onion and cook until soft, stirring often, about 5 minutes. Add Brussels sprouts and cook until one side of the sprouts turns golden brown, 5 to 7 minutes.