Sauté the aromatics:
Heat olive oil in a large pot over medium heat. Add the chopped onion and sauté for 3–4 minutes, until softened. Add the minced garlic and cook for 1 minute until fragrant.
Simmer the broth:
Pour in the chicken or vegetable broth and bring it to a gentle boil.
Cook the orzo:
Stir in the orzo pasta and cook according to package instructions, typically 8–10 minutes, until tender. Lower the heat to a gentle simmer once the orzo is cooked.
Prepare the egg-lemon mixture:
In a medium bowl, whisk together the eggs and lemon juice until well combined. Slowly ladle about 1 cup of hot broth into the egg mixture while whisking constantly to temper the eggs. This prevents the eggs from scrambling when added to the soup.
Thicken the soup:
Gradually pour the tempered egg mixture back into the pot while stirring constantly. The soup will thicken slightly and develop a creamy texture.
Season and serve:
Season with salt and black pepper to taste. Ladle the soup into bowls and garnish with fresh dill or parsley if desired.