Sauté the onions and garlic in butter in the Instant Pot. Press the SAUTE button. When the front of the Instant Pot says "Hot" then add the butter (or oil). When the butter or oil is hot (butter will melt; oil will start to shimmer), then add the sliced onions and cook for about 3 minutes. Then add the minced garlic and cook for about 1 minute.
Pour in the chicken or vegetable broth and then add the peeled and 1/4 inch sliced potatoes.
Next Pressure cook for 1 minute on HIGH PRESSURE. (Yes, only 1 minute, that is NOT a typo.) Press the PRESSURE COOK or MANUAL button (depending on model) and then adjust the + or - sign to 1 to set it to pressure cook on HIGH PRESSURE for 1 minutes. Close the lid. Move the Pressure Release Valve to the SEALING position. (NOTE: It will take several minutes, maybe 10 minutes, to come up to pressure. While it is coming up to pressure, it will say "On" and when it has reached the correct pressure, the display will show 1 and start counting down the time.)
Do a QUICK RELEASE after it has finished pressure cooking for 1 minute. Move the pressure release valve to the VENTING position to release the pressure. When the pin has dropped and pressure has been released, then open the lid.
Transfer the potatoes to an oven safe casserole dish. LEAVE the liquid in the Instant Pot.
Make the Cheesy Cream Sauce. Pour the heavy cream into the Inner liner Pot of the Instant Pot with the remaining liquid, and then add the shredded cheese and salt, pepper, dried thyme, and cayenne (optional) to the Inner Liner Pot of the Instant Pot.
Pour the cheesy cream sauce over the potatoes and toss to coat.
Preheat the broiler and broil the scalloped potatoes for about 3 minutes. Be sure to watch carefully, as they can go from perfect to burned very quickly.
The width of the potato slices matters because it can affect the cooking time and the texture of the potatoes.
Normally, an Instant Pot is set it and forget it. However, since this only requires 1 minute of pressure cooking and then a quick release, don't go far from your Instant Pot. If you don't do a quick release right away the potatoes may end up overcooked.
Watch the potatoes while broiling. The tops of the potatoes will brown very quickly. It took about 3 minutes for me but the time may vary depending on your oven and broiler.