Bring a large pot of well salted water to the boil. Add the pasta and cook until al dente, following packet instructions. Before draining, reserve about 1 cup of the pasta water, then drain.
Heat a drizzle of oil in a large pan over medium heat. Add the diced onion and cook for 4 to 5 minutes, stirring occasionally, until soft and lightly golden. Add the garlic and cook for 30 seconds until fragrant.
Add the tomatoes and dried herbs. Stir well then bring to a gentle simmer. Cook for 8 to 10 minutes, stirring occasionally, until the sauce thickens slightly.
Add the drained pasta to the sauce along with a splash of the reserved pasta water. Toss well to coat, adding more pasta water a little at a time until the sauce clings to the pasta.
Taste and adjust with salt if needed. If the sauce tastes too sharp, add a small pinch of sugar. Serve hot.