Do not overfill the pressure cooker or the Instant pot.
I would recommend using a large pressure cooker, at least 5 liters to pressure cook, If you are cooking a whole pumpkin at once without cutting or just cutting it into 2.
Else you can cut the pumpkin into smaller size pieces and add around ¾ the capacity of your cooker.