In a large pot over medium heat, cook the chopped bacon until crispy. Remove the bacon and set aside, leaving the drippings in the pot.
Add the diced onion to the pot and sauté for about 5 minutes until softened. Stir in the minced garlic and cook for an additional minute.
Pour in the chicken broth and bring to a simmer. Add the white beans, thyme, rosemary, bay leaf, carrots, and celery. Season with salt and pepper.
Let the soup simmer for 20-25 minutes, until the vegetables are tender.
If using, stir in the chopped kale or spinach and cook for another 5 minutes until wilted.
Return the crispy bacon to the pot and stir to combine. Remove the bay leaf before serving.