Heat olive oil in a large pot or Dutch oven over medium heat. Add the diced onions and cook until translucent, about 3-4 minutes. Add the minced garlic and cook for another 30 seconds until fragrant.
Add tomato paste and cook for 1-2 minutes, stirring constantly. Pour in the diced tomatoes with their juices and stir to combine, scraping any browned bits from the bottom of the pot.
Pour in the vegetable or chicken broth. Add dried basil, oregano, thyme, and the bay leaf. Season with salt and pepper. Bring the mixture to a gentle boil, then reduce heat and simmer uncovered for 15 minutes.
Add the uncooked elbow macaroni directly to the simmering soup. Cook until the pasta is al dente, about 8-10 minutes, stirring occasionally to prevent sticking.
Remove the bay leaf. Reduce heat to low and stir in the heavy cream and grated Parmesan cheese. Heat through for about 2 minutes, being careful not to boil after adding the cream. Taste and adjust seasonings as needed.
Ladle the hot soup into bowls and garnish with additional Parmesan cheese and fresh basil if using.