Heat olive oil in a large skillet over medium heat. Add the diced onion and cook until translucent, about 4-5 minutes. Stir in the minced garlic and cook for another 30 seconds until fragrant.
Pour in the crushed tomatoes, then sprinkle in dried oregano, dried basil, salt, and pepper. Simmer the sauce on low heat for 10 minutes, stirring occasionally.
Slowly add the heavy cream to the tomato sauce, stirring continuously to combine. Let the sauce simmer for another 3-5 minutes until creamy and luscious.
In a large mixing bowl, toss the gnocchi with the creamy tomato sauce until well coated.
Transfer the gnocchi and sauce mixture into your greased baking dish. Sprinkle the shredded mozzarella evenly over the top, followed by the grated Parmesan cheese.
Preheat your oven to 375°F (190°C). Bake the gnocchi for 20-25 minutes, or until the cheese is melted, bubbly, and golden brown.
Remove from oven and let it rest for a few minutes. Garnish with fresh basil leaves before serving.