portion size
It's possible to easily fit pumpkin into your low-carb lifestyle, but watch the portion sizes! Most pumpkin baking recipes call for a small amount so the pumpkin itself usually won't add too many net carbs.
OTHER INGREDIENTS
If you're baking with pumpkin, take note of the other ingredients. Does the recipe call for sugar? Flour? Or low-carb alternatives? These added carbs might be the problem- not necessarily the pumpkin! High fiber ingredients will also help lower the total net carbs of a recipe.
your goals
What are your own macro goals? This is always the most important item to consider when looking to incorporate certain foods into a keto or low-carb lifestyle. As always, use your own best judgement and determine what works for you.