Place dried beans in a large heavy-bottomed stock pot and add plenty of cold water. Add onion, green bell pepper, and bay leaves. Season the cold water with salt and turn on the heat to high. Bring to a boil and then reduce to a simmer. Cover the pot and cook for about 1½-3 hours, or until beans are soft.
When beans have about 30 minutes left to go, heat olive oil in a separate large pan on high heat. Add chopped onion and minced garlic along with a pinch of kosher salt. Cook until onion turns translucent. Add green bell pepper and more salt, then reduce heat to low. Cook until the sofrito is soft and melty.
When sofrito is done, remove the pieces of green bell pepper and Spanish onion from the beans and discard them. Pour cooked sofrito directly into the pot with the beans and stir to combine.
Simmer for another 30 minutes. To thicken beans, mash about 1 cup of the beans and add back to the pot. Add white sugar, apple cider vinegar, and white wine. Let it go for another 15 minutes and adjust seasonings as needed.
Serve with white rice.
