Preheat your oven to 400°F (200°C).
Arrange the halved tomatoes and garlic on a baking sheet. Drizzle with olive oil and sprinkle with salt, black pepper, and oregano.
Roast for 30-35 minutes, until the tomatoes are soft and slightly caramelized.
In a large pot, melt butter or olive oil over medium heat.
Add chopped onions and sauté until soft, about 3-4 minutes.
Stir in the roasted tomatoes and garlic, then pour in the vegetable broth.
Using an immersion blender, puree the soup until smooth. If using a regular blender, work in batches and blend carefully.
Return the soup to the pot and stir in heavy cream (or coconut milk), sugar, and red pepper flakes if using.
Simmer for 5 more minutes, then add chopped fresh basil and stir well.
Taste and adjust seasoning as needed.