Instructions:
1. Preheat your oven to 375°F (190°C).
2. In a large skillet, cook the ground beef over medium heat until browned. Drain any excess fat from the skillet and set the cooked beef aside.
3. In the same skillet, melt the butter over medium heat. Add the diced onion and minced garlic, cooking until they become translucent and fragrant.
4. Sprinkle the flour over the onions and garlic, stirring well to combine. Cook for an additional minute to cook out the raw flour taste.
5. Slowly pour in the milk while stirring continuously to avoid lumps. Cook the mixture until it thickens and becomes creamy.
6. Add the dried thyme, dried oregano, salt, and pepper to the creamy mixture. Stir well to incorporate the flavors.
7. In a greased casserole dish, layer half of the sliced potatoes. Spread half of the ground beef over the potatoes, followed by half of the creamy mixture. Sprinkle half of each shredded cheese over the layers.