Warm a large pot over medium heat and gently cook the onion, carrots, celery, and garlic until they become soft.
Add the ham bone or the diced ham along with the soaked white beans to the pot.
Pour the chicken broth into the mixture and season with thyme, salt, and pepper.
Bring the soup to a steady boil, then lower the heat and let it cook slowly for 1 to 2 hours until the beans reach tenderness.
If you used a ham bone, take it out, shred any meat on it, then stir the meat back into the soup. Taste and adjust the seasoning before serving hot.