Take a frying pan and heat oil in it at medium heat.
Add garlic cloves, onions, and kosher salt to the pan. Cook until your vegetables are soft and start turning brown- like for 3-4minutes.
Add half of the Beans to the pan and mash them completely using a wooden spoon or a potato masher. For the remaining half beans, you can add and mash them too or just cook them as it is-depends on your texture preference.
Keep on stirring and cooking the beans until they start to become soft. Don’t forget to add water or bean liquid to the dish. You can add the liquid after the cooking’s done and the beans are cooling down- so that it will prevent the Beans from getting a soupy texture.