Place a medium saucepan over medium heat and allow it to warm for about 1 minute.
Add olive oil to the saucepan and swirl it evenly around the bottom.
Add the finely chopped onion and sauté for about 4 to 5 minutes until soft and translucent.
Stir occasionally to prevent the onions from browning too quickly.
Add the minced garlic to the saucepan and cook for about 30 seconds until fragrant.
Avoid overcooking the garlic because burnt garlic can create a bitter flavor.
Stir in the tomato paste and cook for 1 minute to deepen the flavor.
Slowly pour in the crushed tomatoes while stirring continuously.
Add the Italian seasoning, salt, black pepper, sugar, and optional red pepper flakes.
Mix everything thoroughly so the seasonings distribute evenly throughout the sauce.
Reduce the heat to low and allow the sauce to simmer gently.
Stir the marinara sauce every few minutes to prevent sticking.
Let the sauce cook uncovered for 20 to 25 minutes to develop a rich flavor.
As the sauce simmers, the tomatoes will thicken and the flavors will intensify.
Taste the sauce halfway through cooking and adjust seasoning if needed.
Add a little more salt or sugar depending on the acidity of the tomatoes.
Stir in the chopped fresh basil and parsley during the final 2 minutes of cooking.
Allow the fresh herbs to blend naturally into the sauce.
Remove the saucepan from the heat once the sauce reaches your preferred consistency.
Let the marinara sauce cool slightly before serving.
Use immediately with pasta, pizza, meatballs, or appetizers.
Store leftovers properly after cooling completely.