Prep the spinach. If using fresh spinach, rinse well and shake dry. Wilt it in a large skillet with a splash of water over medium heat, tossing until just softened (2–3 minutes).
If using frozen spinach, thaw completely. Either way, transfer to a colander and squeeze out as much liquid as possible. Chop roughly.
Sauté aromatics. In the same skillet, melt the butter over medium heat (add olive oil if needed).
Add chopped onion or shallot and a pinch of salt. Cook until soft and translucent, about 4–5 minutes. Stir in garlic and cook 30 seconds until fragrant.
Make a quick roux. Sprinkle in the flour and stir for 1 minute to coat the aromatics.
This step removes the raw flour taste and sets you up for a smooth sauce.
Add dairy gradually. Whisk in the milk slowly, breaking up any lumps, then add the cream. Reduce heat to medium-low and simmer, stirring, until thickened and silky, 3–5 minutes. If using cream cheese, whisk it in now until melted.
Season the base. Add Parmesan, a pinch of nutmeg, black pepper, and salt to taste.
If you like a touch of heat, add red pepper flakes. The sauce should taste well-seasoned before adding spinach.
Fold in the spinach. Stir in the chopped spinach until evenly coated. Simmer for 1–2 minutes so the flavors marry.
If it’s too thick, splash in a bit more milk; if too loose, let it bubble gently to reduce.
Finish and adjust. Off the heat, add lemon juice to brighten. Taste and adjust salt, pepper, and nutmeg. The flavor should be creamy, savory, and lively.
Serve warm. Spoon into a serving dish and top with a little extra Parmesan or cracked pepper if you like.