Preheat your oven to 350°F.
In a large skillet over medium heat, cook the ground beef and diced onion until the beef is browned and the onion is translucent, about 5-7 minutes. Drain any excess fat.
Stir in garlic powder, salt, and black pepper. Remove from heat and let cool slightly.
In a large bowl, combine the cooked beef mixture, shredded cheddar cheese, sour cream, and cream of mushroom soup. Mix until well combined.
Spread the beef mixture evenly in a greased 9x13-inch baking dish.
Arrange the frozen tater tots in a single layer on top of the beef mixture.
In a small bowl, mix together ketchup and mustard, then drizzle over the tater tots.
Bake in the preheated oven for 30-35 minutes, or until the tater tots are golden brown and crispy.
If desired, sprinkle chopped pickles on top before serving.