Preheat the oven to 375°F (190°C).
On a baking sheet, toss the cherry tomatoes and smashed garlic with olive oil, thyme, rosemary, crushed red pepper flakes, salt, and black pepper.
Roast in the oven for 20-25 minutes, or until the tomatoes are soft and slightly caramelized.
If using prosciutto, lay the slices on a separate baking sheet and bake for 10-12 minutes until crispy.
In a large pot of salted boiling water, cook the pasta according to package instructions until al dente.
Reserve 1 cup of pasta water, then drain the pasta and set aside.
In the same pot, melt the butter over medium heat.
Add the roasted tomatoes and garlic, scraping up any browned bits from the bottom of the pot.
Stir in the ricotta cheese until creamy, then add the cooked pasta and toss to coat.
If the sauce is too thick, gradually add pasta water until desired consistency is reached.
Serve the pasta hot, topped with crispy prosciutto if desired. Enjoy!