Preheat your oven to 350°F (175°C).
In a skillet over medium heat, sauté the chopped onion and minced garlic until they are translucent, about 3-4 minutes.
Add the chopped mushrooms to the skillet and cook until the moisture has evaporated, around 5-7 minutes. Remove from heat and let cool slightly.
In a large mixing bowl, combine the ground beef, sautéed mushroom mixture, shredded Swiss cheese, breadcrumbs, milk, egg, Worcestershire sauce, thyme, salt, and pepper. Mix until well combined.
Transfer the meat mixture to a meatloaf pan or loaf pan. Press it down evenly and shape it as desired.
Spread the ketchup over the top of the meatloaf for added flavor and moisture.
Bake in the preheated oven for about 60 minutes, or until the internal temperature of the meatloaf reaches 160°F (70°C).
Once cooked, remove from the oven and let it rest for 10 minutes before slicing.
Serve warm with your favorite sides.