Heat olive oil in a pan over medium heat
Add chopped onion and cook until soft
Add minced garlic and cook briefly
Add tomato paste and cook for 1 minute
Add crushed tomatoes or tomato sauce
Add salt and black pepper
Add dried basil, oregano, and red pepper flakes if desired
Simmer on low heat for 15 to 30 minutes
Stir occasionally
Add a little water if the sauce gets too thick
Taste and adjust seasoning
Add sugar if the sauce is too acidic
Stir in fresh basil or parsley at the end
Serve over cooked pasta
