Warm a large pot over medium heat and cook the onion, carrots, celery, and garlic until they begin to soften.
Add the ham bone or diced ham along with the soaked white beans into the pot.
Pour in the chicken broth and sprinkle in the thyme, salt, and pepper.
Bring the mixture to a boil, then lower the heat and let it simmer gently for 1 to 2 hours until the beans are soft.
Take out the ham bone if used, shred any meat from it, and stir the meat back into the soup. Adjust the seasoning as needed and serve piping hot.