Put the oil in a large pan or casserole pot with the thyme, parsley, basil, and oregano. This will infuse the oil with the flavour of the herbs.
Cook on a low heat until the herbs begin to crisp up, about 5 mins. remove the herbs and discard, leaving the herb infused oil in the pan.
Add the onion and garlic and cook gently until transparent, 5-7 mins. Add the tomatoes. season well with salt and pepper and red pepper flakes.
Bring to a boil, then reduce to a simmer and cook until very thick, about 30-40 mins. Preheat the oven to 200°C.
When the sauce is thickened, stir in the cream. Add the gnocchi. Transfer the gnocchi and sauce to an oven proof dish and top with the sliced mozzarella. Put in the oven until the cheese is melted and browned.