¼ cup extra-virgin olive oil
1 yellow onion, thinly sliced
Kosher salt, to taste
2 cloves garlic, thinly sliced
1 dried bay leaf
Pinch granulated sugar, plus more to taste
Pinch red pepper flakes
1 28-ounce can diced or crushed San Marzano plum tomatoes
1 pound whole-milk ricotta
2 large eggs, lightly beaten
1 tablespoon unsalted butter, melted and slightly cooled
1 teaspoon lemon zest
2 tablespoons finely chopped fresh parsley
2 tablespoons finely chopped fresh basil
1 tablespoon finely chopped fresh oregano
½ cup grated Pecorino Sardo PDO Maturo, plus more for garnish
1 teaspoon kosher salt, plus more to taste
1 cup all-purpose flour, plus more as needed
TOMATO SAUCE: Set a large sauté pan or nonreactive pot over medium heat. When pan is hot, add olive oil. When oil shimmers, add onion and big pinch of salt and lower heat to medium-low. Sweat onions for 6 to 7 minutes, or until softened and beginning to turn translucent.
Stir in garlic, bay leaf, sugar, and red pepper flakes, plus another pinch of salt. Cook for another minute or two.
Add tomatoes. Fill empty tomato can with a bit of water and swirl it around to incorporate any remaining tomato juices and pour into the pot. If using diced tomatoes, mash with a wooden spoon to help them break down and further release juices.
Bring sauce to a boil, then reduce to a simmer. Season with another pinch of salt, as well as sugar if the tomatoes are on the acidic side. Cook over low heat, stirring occasionally, about 30 minutes or until sauce is jammy and tomatoes have lost their raw, tinny edge. Season with more salt and sugar if needed.
GNOCCHI: Place ricotta in a large bowl and stir in eggs, melted butter, lemon zest, herbs, Pecorino Sardo, and salt. Add flour and mix until a shaggy dough forms. If dough is extra sticky, add a tablespoon or two of flour.
Line 1 baking sheet with parchment paper, while coating another with an even layer of flour. Using a spoon held at an angle, scoop out a rounded tablespoon of batter. Use your fingertip to push the scoop onto the floured baking sheet, creating an almond shape as you do so. Lightly coat the gnocchi in flour, lift and shake off any excess, and transfer it to the parchment-lined sheet. As long as the gnocchi are all evenly sized, don’t worry too much about perfect shape.
Repeat process with remaining dough, working in batches of 4 to 6 gnocchi at a time (if you let them sit on flour too long, they’ll absorb too much). If not using immediately, place in the refrigerator.
When ready to cook, bring a large pot of water to a boil and salt it generously. Add the gnocchi and stir once very gently. Cook until they float to the top, then cook for another 30 seconds. Drain in a colander and then return to the pot. Add a generous scoop of tomato sauce and toss to coat evenly.
Divide among serving bowls, spooning more sauce on top. Garnish generously with Pecorino Sardo and serve immediately.