Heat olive oil in a skillet over medium heat. Add onion and cook until soft, about 5 minutes. Add garlic and cook for 1 minute, stirring.