Add water, half of the onion, half of the garlic, bay leaves, and salt.
Lock the lid on and set the Instant Pot to "Manual"and "High Pressure" for 40 minutes. Be sure the valve on top is set to “Sealed”.
When cooking time is done, turn off the heat, and allow pressure to release on its own (natural/slow release method) before opening lid.
Remove lid and turn Instant Pot back on. Add remaining onion and garlic and stir into beans along with the remaining seasonings. (If desired, onions and garlic can be sauteed before adding to beans.)
Boil beans uncovered for an additional 45 minutes, stirring occasionally. Beans will become super soft and creamy.
Remove bay leaves before serving.
For the photos in this post, although the beans are well cooked, I didn't cook them as long as I would if I weren't taking a photo of them (because they are quite un-photogenic when I cook them longer). For the best beans, you'll want to cook them until they are more creamy.
Extra beans can be frozen for a quick meal on another day.
Recipe by JennifersKitchen at https://jenniferskitchen.com/2019/02/brazilian-beans.html