Rinse pinto beans in a colander, removing any unwanted pebbles.
Add beans to a large pot, cover with water, and soak overnight.
Drain soaked beans, return them to the pot, cover with fresh water, and add the quartered onion and a couple of dashes of salt.
Bring beans to a boil, cover, and simmer for one hour, stirring occasionally until beans are fully cooked.
Drain beans, removing the onion and reserving the bean broth water.
In a large skillet, heat lard or oil over medium heat. Add minced garlic and stir.
Add beans, cumin, oregano, and ¼ cup of the bean broth. Cook while gently smashing the beans with a potato masher or fork.
Continue mashing and stirring, adding bean broth as needed until you get a soft mashed potato-like consistency. Season with additional salt, cumin, and oregano to taste. Top with shredded cheese if desired.