Heat olive oil in a pan over medium heat
Add chopped onion and cook until soft
Add minced garlic and cook briefly
Add crushed or chopped tomatoes
Add salt and black pepper
Add sugar if needed to balance acidity
Add dried basil, oregano, or other herbs
Simmer on low heat until thickened
Stir occasionally to prevent sticking
Taste and adjust seasoning
Use immediately or cool and store
