Rinse the pinto beans under cold water, removing any debris, and soak them in water for at least 6 hours or overnight. If short on time, you can skip soaking but may need an additional hour of cooking.
Drain the soaked beans and place them in the slow cooker.
Add the diced onion, minced garlic, cumin, chili powder, vegetable broth, olive oil, black pepper, and a pinch of salt to the slow cooker. Stir to combine all the ingredients well.
Cover and set the slow cooker to low heat. Cook for about 8 hours, or until the beans are tender.
Once cooked, use a fork or potato masher to mash the beans to your desired consistency. If you prefer a creamier texture, you can blend the beans using an immersion blender or regular blender in batches.
Taste the refried beans and adjust the seasoning as needed, adding more salt or spices to suit your preference.
Serve warm as a side dish or use in your favorite recipes.