Wait until the stalks and leaves dry up to harvest the pumpkins. You can eat them straight away but if you plan on storing the pumpkins you will need to ensure they are harvested with the stalk still on. You don’t want to harvest the pumpkins too early but also be careful not to leave them on the ground too long otherwise they will rot underneath.
Before you store the pumpkins make sure they are clean to stop the dirt from rotting them later on. Store them in a dry place which has air circulating. And remember to check them often and remove any that rot so they don’t cause the others to rot as well.