If using dried beans, soak them overnight or according to package instructions. Drain and rinse before using.
In a large pot, heat the olive oil over medium heat. Add the diced onion, garlic, carrots, and celery, and sauté for 5-6 minutes until softened.
Add the soaked beans (or canned beans if using), beef ham hock, broth, bay leaf, and dried thyme to the pot. Stir to combine.
Bring the soup to a boil, then reduce the heat to a low simmer. Cover and cook for 1.5 to 2 hours, or until the beans are tender and the flavors have melded. Stir occasionally and add more broth if needed.
Once the soup is cooked, remove the beef ham hock. Shred any meat from the hock and return it to the soup.
Season with salt and pepper to taste. Ladle the soup into bowls and garnish with fresh parsley if desired.