Preheat oven to 375°F and lightly grease a 9x13-inch baking dish.
In a large frying pan, melt butter over medium heat.
Add diced onion and cook for about 2 minutes.
Add ground beef and cook until the beef is browned and the onion is tender.
Drain any excess grease from the pan.
Add garlic, fresh thyme, Worcestershire sauce, and a sprinkle of salt and pepper. Cook for another 1–2 minutes.
Transfer the beef mixture to the prepared baking dish.
Add cream of mushroom soup and drained green beans. Stir everything together until evenly combined, then spread into an even layer.
Sprinkle half of the shredded cheddar over the beef mixture.
Arrange the frozen tater tots in an even layer over the cheese.
Sprinkle the remaining cheddar over the tater tots.
Bake for 35–40 minutes, until the tater tots are golden brown and crispy and the cheese is melted.
Let cool for a few minutes before serving.