Melt the butter in a large saucepan or stock pot over medium heat. Add the minced onion and cook, stirring occasionally, until the onion is translucent and softened.
Add the diced potatoes, chopped broccoli, salt, dried thyme, dried basil, ground black pepper, and chicken stock to the pot with the sautéed onions. Stir well to combine. Cover the pot, reduce heat to medium-low, and cook until the potatoes are just tender, about 10 minutes.
Stir in the diced cooked ham. In a small bowl, whisk together the all-purpose flour and water until smooth and free of lumps. Gradually whisk this mixture into the soup. Bring the soup to a gentle boil and cook for 5 minutes to allow the flour to thicken the broth. I like to thoroughly whisk the flour and water to avoid any clumps in the soup.
Reduce the heat to low and stir in the heavy cream and shredded white cheddar cheese. Simmer, stirring occasionally, until the cheese is fully melted and the soup is creamy and smooth. Taste and adjust seasoning if needed. For a richer flavor, I prefer to use heavy cream rather than milk at this stage.