Heat 1 Tbsp olive oil in a heavy skillet over medium heat. Add garlic cloves and cook, stirring, until they turn golden brown and fragrant—about 2 minutes. Remove garlic and mash into a paste.
Add remaining 1 Tbsp olive oil to the skillet. Stir in chopped onion and sauté until translucent, about 3–4 minutes.
Pour in red wine (or broth) to deglaze the pan, scraping any browned bits. Let it bubble and reduce for 1 minute.
In a blender or food processor, combine crushed tomatoes, tomato paste, roasted garlic paste, Italian seasoning, basil, red pepper flakes, salt, pepper, and sugar (if using). Blend until silky.
Return the purée to the skillet. Stir and simmer on low for 5–7 minutes, stirring occasionally, until slightly thickened and flavors meld.
Garnish with fresh basil leaves and serve warm over pasta, meatballs, or use as a dipping sauce.