Melt butter in a large pot or Dutch oven over medium heat. Add the chopped onion and cook until softened, about 5 minutes. Add the minced garlic and cook for another minute until fragrant, being careful not to burn it.
Stir in the flour and cook for 1-2 minutes to create a roux. Gradually whisk in the chicken or vegetable broth, making sure to smooth out any lumps. Add the cubed potatoes, thyme, rosemary, salt, and pepper. Bring the mixture to a boil, then reduce the heat and simmer for 15-20 minutes, or until the potatoes are tender.
Once the potatoes are cooked through, use an immersion blender to partially blend the soup. You can also use a regular blender, but be very careful when blending hot liquids. Leave some chunks for a heartier texture. Stir in the milk or cream and heat through, but do not boil.
Remove the pot from the heat and stir in the shredded cheddar cheese until it is melted and smooth. Make sure the soup isn’t too hot, as this can cause the cheese to separate.
Ladle the soup into bowls and garnish with fresh parsley. Optional toppings include bacon bits, sour cream, and chives. Serve hot and enjoy!