Melt the butter in the Instant Pot set on the Sautee setting. Add the onion and cook until translucent, around 5 minutes. Add the garlic and saute for 30 seconds more.
Incorporate the rice and stir, cook until the rice is slightly transparent, around 2 minutes. Pour the white wine and stir to incorporate and cook for 30 seconds more.
Pour the stock and add the pumpkin or butternut squash. Close the lid and valve and set on high pressure for 6 minutes.
Manually release steam. Open the valve and lid. Give the risotto a good stir.
Add the heavy cream, salt, and parmesan cheese and stir to incorporate.