Preheat oven to 400°F (200°C).
Line a baking tray with parchment paper. Add cherry tomatoes and unpeeled garlic cloves. Drizzle with olive oil, season with salt and pepper, and toss to coat.
Roast the tomatoes and garlic for 20–25 minutes until blistered and slightly caramelized.
Cook the pasta in salted boiling water according to package directions. Reserve ½ cup of pasta water, then drain.
Prepare the ricotta sauce:
In a large pan, melt butter over medium heat. Squeeze roasted garlic from skins and mash into the butter. Stir in ricotta cheese, Parmesan, and a few spoonfuls of pasta water to create a smooth sauce.
Add the roasted tomatoes to the pan and gently crush them to form a tomato sauce from fresh tomatoes. Simmer for 2–3 minutes.
Toss the pasta with the sauce until fully coated. Adjust the consistency with more pasta water if needed.
Season and serve:
Add salt, pepper, and red pepper flakes to taste. Garnish with fresh basil leaves and a sprinkle of Parmesan.