Drain and rinse the beans; set aside.
Warm the olive oil in a large pot over medium heat.
Add onion, carrots, and celery with a pinch of salt. Cook until softened, 6–8 minutes.
Stir in garlic, thyme, paprika, and black pepper. Cook 1 minute until fragrant.
Pour in the broth. Add cabbage and ham; stir to combine. Bring to a boil.
Lower heat to a gentle simmer. Cook until cabbage is tender, 20–25 minutes.
Stir in the beans and simmer until hot and flavors meld, 8–10 minutes.
Finish with vinegar and parsley. Adjust salt and pepper. Serve with red pepper flakes.