Bring a large pot of salted water to a boil. Cook the pasta according to package instructions until al dente. Drain and set aside.
While the pasta cooks, heat olive oil in a large skillet over medium heat. Add minced garlic and chopped onion; sauté until softened and fragrant, about 3–4 minutes.
Add the halved cherry tomatoes to the skillet and cook for another 5 minutes, stirring occasionally, until they begin to break down and release their juices.
Stir in the heavy cream, Parmesan cheese, red pepper flakes (if using), salt, and black pepper. Simmer gently for 2–3 minutes until the sauce thickens slightly.
Add the cooked pasta to the skillet and toss well to coat evenly with the sauce. If desired, stir in butter for extra richness.
Serve immediately, garnished with fresh basil leaves and additional Parmesan if desired.
Notes
For a lighter version, substitute half-and-half for heavy cream and omit butter.