Preheat the oven to 375°F and grease a 9x13-inch baking dish.
In a large skillet, melt butter over medium heat. Add chopped onion and green bell pepper, sautéing until softened.
1 onion, 1 green bell pepper, 2 tablespoons unsalted butter
Sprinkle flour over the vegetables, stirring constantly for 1-2 minutes to create a roux.
¼ cup all-purpose flour
Gradually whisk in milk, ensuring a smooth consistency. Cook until the mixture thickens.
½ cup milk
Stir in 1 cup of cheddar cheese and the mozzarella cheese until melted, creating a velvety cheese sauce.
2 cups shredded cheddar cheese, 1 cup shredded mozzarella cheese
Season with garlic powder, black pepper, dried thyme, and salt. Mix well. Taste and adjust seasonings as desired.
1 teaspoon garlic powder, ½ teaspoon black pepper, ½ teaspoon dried thyme, ¼ teaspoon salt
In the prepared baking dish, layer half of the tater tots, followed by diced ham. Pour the cheese sauce evenly over the layers. Top the casserole with the remaining tater tots.
1 32 ounce package frozen tater tots, 4 cups cooked ham
Bake in the preheated oven for 30-35 minutes. Remove from the oven and top with the remaining cheese. Bake for an additional 10 minutes or until the casserole is bubbly, and the tater tots are golden brown.
Allow the casserole to cool for a few minutes before serving.