Saute the bacon in a large skillet until brown and crispy. Drain it, crumble it, and set it aside.
In a stockpot, melt butter over medium heat. Add the onion and garlic and stir frequently until the onions become translucent.
Stir in the corn and thyme and cook for 1-2 minutes. The thyme should really start smelling good now.
Whisk in the flour and let it cook for at least a minute or two until it browns slightly. If you don't cook it for a bit, your soup will taste like flour. Yuk. Then whisk in the milk and cook until slightly thickened. Keep whisking it so it doesn't burn to the bottom of the pan.
Stir in the potatoes and bring it to a boil, then reduce the heat and let it simmer for 12-15 minutes until the potatoes are tender.
Stir in the ham, sour cream, and cheese. If the soup is too thick, add some milk until it's how you like it. Then salt and pepper to taste. You can stir in the bacon or add it as a garnish to each bowl. Serve immediately.