Turn your Instant Pot to the SAUTE function. Add 3 tbsp butter to the pot and allow it to melt. Then, add the 3 sliced onions.
Stir the onions in the pot for about 10-15 minutes until they start to really whither and brown. You can add extra butter if you think it’s necessary. Once the onions have started to brown, add 1 tbsp granulated sugar and stir for another 30-35 minutes until the onions caramelize.
Once the onions have caramelized, add ¼ cup of dry white wine and continue sauteeing until the wine cooks down.
Once the wine is gone from the pot, add 4 cups beef stock, 2 tsp worcestershire sauce, 1 ½ tsp chopped garlic, 2 bay leaves, 4 sprigs thyme, ¼ tsp salt (or more to taste), ¼ tsp pepper.
Turn the pot to HIGH and pressure cook for 15 minutes. Allow for a 10 minute Natural Pressure Release, then perform a Quick Release.
Spoon the soup into 5-6 oven-safe bowls. Place enough bread slices to cover the top of the soup, then sprinkle gruyere cheese on top.
Place the soup crocks on a cookie sheet and turn the oven to a High Broil. Place in the oven under the broiler and broil until the cheese starts to bubble and toast.
Enjoy!