Heat olive oil in a pan over medium heat
Add chopped onion and cook until soft
Add minced garlic and cook briefly
Add ground beef or sausage if using, and cook until browned
Stir in tomato paste and cook for 1 to 2 minutes
Add crushed tomatoes or tomato sauce
Add salt, black pepper, dried oregano, and dried basil
Add a pinch of sugar if needed
Simmer on low heat for 20 to 30 minutes
Stir occasionally
Taste and adjust seasoning
Serve over cooked spaghetti
