Preheat oven to 350º and grease a 9x13 casserole baking dish.
Preheat medium pot over medium heat on stove-top.
Add oil, heat it through and add onions. Saute onions until they start to brown.
Smash and mince garlic and add it to the onions. Stir and saute until fragrant.
Sprinkle flour over the onions and stir well. Stir for a few seconds and start slowly pouring in chicken stock, while stirring. Pour in milk after that while stirring as well.
Let the mixture heat through and start to thicken.
Stir in sour cream, cheese, salt, and pepper. Let the mixture cook and thicken as the cheese melts. Taste to make sure you have enough seasoning. Stir in parsley.
Mix hash browns and cheese sauce in a large bowl and spread the mixture in the prepared casserole dish. Make sure it's all spread evenly throughout.
Spread some more cheese on top and bake for 35-40 minutes, until casserole browned and bubbles around the edges.