Bring a large pot of salted water to a boil.
Cook the pasta according to package instructions until al dente.
Reserve 1 cup of pasta cooking water before draining the pasta.
While the pasta cooks, heat butter in a large skillet over medium-high heat.
Add the diced onion and red pepper flakes (if using). Cook for about 5–7 minutes until the onion becomes soft and translucent.
Add the diced tomatoes and minced garlic. Cook for another 2–3 minutes until the tomatoes soften.
Reduce the heat to medium and stir in the tomato sauce and heavy cream.
Season with salt and black pepper and simmer for about 5 minutes until the sauce thickens slightly.
Stir in the Parmesan cheese until melted and smooth.
Add the cooked pasta to the sauce and toss until the pasta is fully coated.
Let the pasta simmer in the sauce for a couple of minutes.
If the sauce becomes too thick, add reserved pasta water a little at a time until the desired consistency is reached.
Stir in the fresh basil just before serving.
Garnish the Creamy Tomato Basil Pasta with extra Parmesan cheese and fresh basil.