Preheat a cooking pot over medium heat and add oil. Add onions and saute until transparent.
Add fresh tomatoes and cook until softened. Smash and mince garlic and add it to the pot. Stir and saute until fragrant.
Add canned tomatoes and crush them with a wooden spoon while mixing.
Sprinkle flour over the vegetables, slowly stir it in while pouring in vegetable broth.
Stir in sugar, salt, red pepper flakes, thyme, and oregano.
Bring the mixture to a low boil and turn the heat down to low. Cover and let it simmer for about 40 minutes.
Stir in fresh basil and transfer the mixture into the blender. Blend until smooth and pour back into the pot. Be careful because the blended soup will splatter as it simmers. Cook for a couple more minutes and serve.
To make the soup cheesy:
Add about 1/2 cup of shaved Parmesan cheese to blended soup. Stir and cook until cheese is melted.
To make the soup creamy:
You can also add cream in addition to cheese or instead of cheese. Add about 1/3 cup of heavy whipping cream to the blended soup and cook for a couple of minutes.