Place your skillet over medium heat and add 2 tablespoons of olive oil. Once shimmering, add the minced garlic and sauté for about 30 seconds until fragrant but not browned.
Stir in the chopped sun-dried tomatoes and cook for 1-2 minutes until their flavor blooms in the warm oil.
Add the gnocchi straight into the skillet. Cook for about 5-7 minutes, stirring occasionally, until golden and slightly crispy on the outside while tender inside.
Add the fresh spinach on top of the gnocchi. Stir gently to combine and cook for another 2-3 minutes until the spinach is tender and bright green.
Sprinkle in the salt, black pepper, and red pepper flakes if using. Stir to evenly distribute the seasoning. Turn off the heat and sprinkle the grated Parmesan cheese over the top, letting it melt slightly.
Give it a final gentle toss, then plate and serve immediately for the best texture and flavor.