Preheat the oven to 180°C (356°F).
Sauté the onion and garlic in olive oil over medium heat in a cast-iron skillet or stainless steel pan until soft, fragrant, and translucent. Add dried oregano and basil, cooking for 1-2 minutes.
Cook the gnocchi: Add more oil if needed, then add the gnocchi. Cook, stirring occasionally, until lightly golden, about 3-5 minutes.
Deglaze the pan with white wine or water, using a wooden spoon or spatula to scrape up any browned bits. Add cream and water (or stock), simmering for about 5 minutes until the gnocchi is cooked.
Combine and finish: Stir in pesto, spinach, and artichokes. The spinach will wilt from the heat. Top with the shredded gouda and bake for 15-20 minutes until the cheese is melted and golden.
Serve directly from the pan.