I strongly recommend opting for storebought if you can. It's specifically designed for baking and has quite a low water content in comparison to homemade. If you have no option but to make your own, I recommend using butternut squash. Butternut squash and pumpkin have a very similar flavor, although butternut squash is actually much sweeter and less watery! I find it to be much better for baking, nobody will be able to tell it's not real pumpkin purée!