In a large Dutch oven or heavy-bottomed pot, melt the butter over medium heat until it begins to foam slightly. Add the diced onions and sauté for 4-5 minutes until they become translucent. Add the minced garlic and cook for an additional 30 seconds until fragrant.
Sprinkle the flour over the sautéed aromatics, stirring constantly to prevent burning. Cook this mixture for 1-2 minutes until it forms a golden paste and the raw flour smell dissipates.
Gradually whisk in the chicken broth, creating a smooth mixture before each new addition. Once incorporated, slowly add the milk while continuing to whisk.
Add the chopped broccoli florets and shredded carrots to the pot, along with the salt, pepper, and dried thyme. Bring the mixture to a gentle simmer and cook for 15-20 minutes, or until the broccoli is tender when pierced with a fork.
Use an immersion blender to puree the soup to your desired consistency directly in the pot. Alternatively, transfer portions to a standard blender and pulse carefully.
Reduce heat to low and add the grated cheddar cheese in small handfuls, stirring after each addition until completely melted. Stir in the half-and-half and nutmeg, then taste and adjust seasonings if needed. Allow the soup to heat through without boiling.