Add onions and cook them until caramelized, for 10-15 minutes.
Once the onions are caramelized, add some stock to deglaze the saucepot.
Add the thyme and rest of the vegetable stock.
Simmer the soup for 10 minutes.
Preheat oven to 375F.
Roll the puff pastry to ¼-inch thick. Place ramekins on top of the puff pastry to get an idea how to cut them. Go slightly over the edges and cut your puff pastry.
Ladle soup into the ramekins. Top with mozzarella. Reserving 2 tbsp.
Place the pastry on top of the soup, gently pinching the edges to the ramekin dish. Brush pastry with egg.
Top the sheet pastry with more mozzarella and bake for 12-14 minutes.