Roast the pumpkin or butternut squash until tender and caramelized to develop deep, rich flavors. Let it cool slightly before pureeing it into a smooth sauce base.
In a large skillet, melt butter over medium heat. Add minced shallots and garlic; sauté until fragrant and translucent. Stir in thyme and sage, cooking for another minute to release their aromatic oils.
Pour in vegetable broth and bring to a simmer. Add the pumpkin puree, heavy cream, salt, and pepper. Cook gently until the sauce thickens and becomes rich and velvety, stirring frequently. Toast pumpkin kernels in a dry pan until golden and fragrant, then sprinkle over the sauce for crunch and earthiness.
Meanwhile, cook the homemade gnocchi in boiling salted water until they float to the surface—about 2-3 minutes. Drain well and add to the sauce, tossing gently to coat every tender, pillowy dumpling.
Finish with a splash of olive oil, grated Parmesan cheese, and a pinch of red pepper for subtle heat. Serve immediately, garnished with extra herbs or cheese if desired.