In an 8-inch saucepan, add the olive oil along with the onion and turn the heat to medium. Add a small pinch of salt and saute until the onion softens and develops a bit of color, about 6 minutes. Add the garlic and cook for 1 minute more. Add the tomatoes along with the sugar and oregano, partially cover the saucepan with a lid, bring to a simmer and cook until the sauce reduces and deepens in color, about 20 minutes.
Remove the lid, add the basil, season with salt and pepper to taste and cook for 5 additional minutes.
Serve immediately or allow to cool completely before storing in the refrigerator for up to 1 week or in the freezer for up to 1 month.