Preheat your oven to 350°F (175°C).
In a skillet over medium heat, sauté the finely chopped mushrooms and diced onion in a little oil for about 5-7 minutes until they're soft and most of the moisture has evaporated. Let this mixture cool slightly.
In a large mixing bowl, combine the ground beef, sautéed mushroom and onion mixture, breadcrumbs, shredded Swiss cheese, egg, minced garlic, Worcestershire sauce, thyme, salt, and black pepper.
Mix everything together with your hands or a spoon until just combined. Be careful not to overmix, as this could make the meatloaf tough.
Transfer the meat mixture into a loaf pan, shaping it into a loaf shape if necessary.
Spread ketchup evenly over the top of the meatloaf for extra flavor and moisture.
Bake in the preheated oven for about 60 minutes, or until the internal temperature reaches 160°F (70°C).
Remove from the oven and let it rest for 10 minutes before slicing. This helps the juices redistribute for a moister meatloaf.