Prepare Tomatoes: If using fresh tomatoes, blanch them in boiling water for 30 seconds, then transfer them to an ice bath. Peel, deseed, and chop the tomatoes. If using canned tomatoes, simply open the can and crush the tomatoes with a spoon or by hand.
Sauté Onion and Garlic: Heat the olive oil in a large pot over medium heat. Add the chopped onion and cook for 5-7 minutes until soft and translucent. Add the minced garlic and cook for an additional 1 minute until fragrant.
Add Tomatoes and Simmer: Add the prepared tomatoes (fresh or canned) to the pot. Stir the mixture and let it simmer on low heat for 30 to 60 minutes. Stir occasionally and cook until the sauce thickens and the flavors meld together.
Season the Sauce: Add the dried oregano, basil, salt, pepper, and optional red pepper flakes. Taste and adjust seasoning as needed. If the sauce is too acidic, add a pinch of sugar to balance it.
Optional Additions: If you like, add a splash of red wine or balsamic vinegar to deepen the flavor. Let it simmer for another 5 minutes to incorporate.
Finish and Serve: Once the sauce has thickened to your liking, remove from heat. Serve immediately with your favorite pasta, garnished with fresh basil if desired.