Heat olive oil in a large skillet or frying pan over medium heat. Add the sliced onions and sprinkle with about ⅔ teaspoon of salt. Sauté the onions for 7–8 minutes, stirring occasionally, until they become golden, translucent, and lightly caramelized. This gentle cooking enhances their natural sweetness, which will infuse the cream sauce with rich flavor.
Meanwhile, prepare the green beans. Trim the tail ends and place them in a medium-sized pot. Add ½ teaspoon of salt and cover the beans with boiling water from a kettle. Bring the pot to a boil on the stove, then reduce the heat to medium and cook the beans for 4–5 minutes. The beans should be tender but still slightly firm, with a vibrant green color. Drain and immediately rinse under cold water to stop the cooking process. Strain and set aside.
Returning to the sauce, once the onions are softened and fragrant, stir in the minced garlic, black pepper, and nutmeg. Let these spices cook for about a minute, releasing their aroma.
Pour in the heavy cream and add the butter. Stir the mixture and let it simmer gently over medium heat for 3–4 minutes, allowing the sauce to bubble and thicken slightly. Stir frequently to prevent it from sticking or separating.
Drizzle in the lemon juice, balancing the sauce’s richness with a touch of acidity. Stir well to incorporate.
Add the cooked green beans to the sauce and mix thoroughly. Allow the beans to heat through in the creamy mixture for a few minutes. Once warm and well-coated, transfer to a serving dish and enjoy!