Preheat oven to 400°F (200°C).
On a large baking sheet, place halved tomatoes (cut side up), onion quarters, and garlic cloves.
Drizzle with olive oil, sprinkle with salt, pepper, thyme, and red pepper flakes. Toss lightly.
Roast for 30–35 minutes until tomatoes are soft and slightly charred.
Transfer roasted veggies to a blender (or use an immersion blender in a pot).
Add broth, tomato paste, and sugar. Blend until smooth.
Pour the mixture into a large pot and simmer for 10 minutes on medium-low heat.
Stir in heavy cream (if using) and adjust seasoning.
Top with fresh basil, a drizzle of olive oil, or croutons.
Serve hot with crusty bread or grilled cheese.