Preheat the oven to 450°F (230°C). Line a quarter sheet pan with parchment paper, or use a toaster oven at 450°F convection.
Add cherry tomatoes, onion wedges, and garlic cloves with their skins on to the pan. Drizzle generously with olive oil, season with kosher salt, and toss.
Roast for 22–25 minutes, until the tomatoes burst and the vegetables soften and develop slightly charred edges.
Cook the pasta in salted boiling water until al dente. Reserve 1 cup of pasta water, then drain.
Melt the butter in the pasta pot, toss in the cooked pasta, cover, and set aside.
Squeeze the roasted garlic out of its skins. Blend it with the roasted tomatoes, onion, pan juices, milk or heavy cream, tomato paste and salt. Blend for 2 minutes, starting on low and increasing to high.
Taste and adjust the salt. For a smoother sauce, strain through a sieve into a bowl.
Pour the sauce over the pasta and add a generous splash of pasta water. Toss over medium-low heat, adding more pasta water as needed, until glossy and coated.
Stir in a little Parmesan if desired. Serve immediately with finely grated Parmesan.