Heat the olive oil or butter in a large skillet over medium heat. Add the chopped onion and cook for a few minutes until soft and slightly translucent.
Add the minced garlic and stir for about 30 seconds, just until fragrant. Don’t let it burn.
Add the gnocchi directly to the pan. Pour in the vegetable broth and let everything simmer, stirring occasionally, until the gnocchi start to soften.
When most of the broth has cooked off, pour in the cream. Stir gently and let it bubble lightly until the sauce starts to come together.
Add the spinach to the pan. It will look like a lot at first, but keep stirring until it wilts down into the sauce.
Lower the heat and crumble in the feta cheese. Stir gently so it melts slightly but still stays a bit chunky.
Season with black pepper and taste before adding salt. Add salt only if needed.
If the sauce feels too thick, add a small splash of broth or cream. If it’s too loose, let it simmer for another minute.
Remove from heat and serve warm.