3 tablespoons olive oil or butter, plus more if needed
1 small onion, chopped
1 28-ounce and one 14-ounce can whole or diced tomatoes; or 2 pounds fresh tomatoes (see the headnote)
1 pound any dried pasta (optional)
Grated Parmesan cheese or Pecorino Romano for serving (optional)
Chopped fresh parsley or basil for garnish (optional)
Steps
If you’re serving pasta with this sauce, bring a large pot of water to a boil and salt it. Put the oil or butter in a large skillet over medium heat. When the oil is hot or the butter foams, add the onion and cook, stirring occasionally, until soft, 3 to 5 minutes. Add the tomatoes, sprinkle with salt and pepper, and bring to a boil.
Lower the heat to a gentle bubble. Cook, stirring and mashing the tomatoes occasionally with the back of the spoon, until they break down and the sauce comes together, 10 to 15 minutes. Taste and adjust the seasonings; keep warm. Or let cool, cover, and refrigerate for up to several days; reheat gently before serving.
If you’re serving the pasta, cook it until tender but not mushy; start tasting after 5 minutes. When it’s done, drain it, reserving 1 cup of the cooking water. Reheat the sauce if necessary. Toss the pasta with the sauce, adding a little more oil or some of the pasta cooking water if it seems dry. Taste and adjust the seasoning, then toss with cheese and parsley if you’re using them.