Preheat the oven to 375 degrees Fahrenheit. Lightly grease a 9x13-inch baking dish.
In a large skillet, melt the butter over medium heat. Add the diced onion and cook for 3-4 minutes until softened. Add the minced garlic and cook for an additional 30 seconds - 1 minute or until fragrant.
Sprinkle the flour over the onion and garlic mixture, stirring to coat. Cook for 1-2 minutes to remove the raw flour taste.
Gradually whisk in the milk and chicken broth, stirring continuously until the mixture thickens, about 5-7 minutes.
Add the cooked chicken, frozen mixed vegetables, salt, and black pepper, mixing until combined.
Pour the mixture into the prepared baking dish and spread it out evenly. Sprinkle the shredded cheddar cheese over the chicken mixture if using.
Arrange the frozen tater tots in an even layer on top of the casserole.
Bake for 35-40 minutes, until the tater tots are golden brown and crispy.
Let the casserole rest for 5 minutes before serving.