Soak: (For un-soaked beans, see notes below.) Soak 2 cups dry pinto beans covered with several inches of water overnight, at least 8 hours.
Instant Pot: (For stovetop directions, see notes below.) Strain pinto bean water using colander. Press "sauté" function on Instant Pot and once hot, add a drizzle of oil. Sauté 1 cup of the white onion until soft, stirring occasionally. Press "cancel" on Instant Pot. Add pinto beans, 4 cups fresh water, 1 bay leaf, and ½ tsp salt. Seal lid and cook on high pressure for 12 minutes, allowing a natural release.
Reserve aquafaba: Strain and reserve the pinto bean cooking liquid using colander and a large bowl. Remove and discard bay leaf.
Aromatics: Heat large pot (my preference) or cast iron skillet on low-medium heat with 2 ½ Tbsp avocado oil. Add onions and optional jalapeño and cook gently until very soft and fragrant, about 10 minutes. (If onions are still crunchy, it will add too much crunch to the finished beans.) Stir in garlic and cook a couple of minutes, stirring frequently. Add cooked pinto beans, 2 tsp cumin, 2 tsp chili powder, 2 tsp Mexican oregano, ½ tsp salt, and ½ cup reserved pinto bean liquid. Use potato masher to smash beans to desired consistency, slowly adding more bean water if needed.
Finishing: Stir in 1 Tbsp lime juice. Taste refried beans and add anything more they may need. Garnish with optional cilantro.
Serving + Storing: Serve refried beans immediately or store in an airtight contain in the fridge for up to 5 days or freeze for 1-2 months.