How to Make It
Cook the pasta according to the package directions. Reserve 1 cup of the cooking water; drain the pasta and return it to the pot.
Meanwhile, melt 2 tablespoons of the butter in a large skillet over medium heat. Add the onion and ½ teaspoon each salt and pepper and cook, stirring occasionally, until soft, 14 to 16 minutes. Transfer to a plate; reserve the skillet.
Add the pumpkin, thyme sprigs, and 1½ cups water to the reserved skillet, cover partially, and cook, stirring occasionally, until the pumpkin is very soft and most of the water has evaporated, 6 to 8 minutes.
Add the onion, pumpkin, thyme leaves, pecorino, the remaining 2 tablespoons of butter, and ½ cup of the reserved cooking water to the pasta and toss to coat (adding more cooking water as needed to loosen the sauce).
Serve the pasta with black pepper and additional pecorino, if desired.