Push the saute button on Instant Pot and add the butter. Once the butter melts, add the diced onion and cook until soft, about 3-5 minutes. Add the garlic and cook stirring constantly so that it doesn't burn, about 30 seconds.
Push the "off" button and add 2 cups of the chicken broth and the rice. Stir everything well, then place the lid on the Instant Pot and turn the pressure release knob to "sealing."