Heat the olive oil in a large saucepan over medium heat.
Add the diced onion and sauté for about 5 minutes, or until it becomes translucent.
Stir in the minced garlic and cook for another minute until fragrant.
Pour in the crushed tomatoes and add the dried oregano, dried basil, red pepper flakes (if using), salt, black pepper, and sugar.
Bring the mixture to a simmer, then reduce the heat to low. Cover the saucepan and let it cook for about 25 minutes, stirring occasionally.
Taste the sauce and adjust the seasoning as needed. If desired, add more salt, pepper, or sugar.
If you prefer a smoother sauce, you can use an immersion blender to puree the sauce to your desired consistency.
Serve hot over your favorite pasta and garnish with fresh basil leaves if desired.