Bring a large pot of salted water to a boil. Cook the pasta according to the package directions until just tender. Before draining, scoop out a cup of the pasta water—you might need it later. Set pasta aside.
In a large skillet over medium heat, warm the olive oil. Add the onion and cook for 4–5 minutes, stirring often, until it softens and turns translucent.
Toss in the garlic and sauté for about 60 seconds, just until fragrant. Stir in the chopped spinach and let it wilt—it should only take a minute or two.
Reduce the heat to low and pour in the heavy cream. Mix in the grated Parmesan, salt, black pepper, and red pepper flakes if using. Stir gently until the sauce is smooth and the cheese has melted completely.
Add the drained pasta to the skillet and toss until evenly coated. If the sauce feels too thick, slowly stir in a splash or two of the reserved pasta water until the consistency is just right.
Plate the pasta and top with a generous sprinkle of fresh Parmesan. Serve warm and enjoy every creamy, cheesy bite.