If using bacon, fry it in a dry pan until crispy, then chop into bits and set aside.
Melt the butter in a large saucepan. Add the onion and cook for 5 minutes until soft.
Add the garlic and diced potatoes. Stir for 1 minute.
Pour in the stock, bring to the boil and simmer for 20 minutes until the potatoes are very soft.
Blend half the soup and return to the pan (this gives it a thick, creamy texture while keeping some chunks). Alternatively, mash roughly with a fork.
Stir in the milk and most of the cheese until melted. Season well.
Serve topped with the remaining cheese, crispy bacon bits and a dollop of sour cream.