Roughly chop the onion and garlic, simmer very softly in the vegetable stock. Take it from the stove and let it cool off.
Put the soy milk in a tall container and add 1 tablespoon of vinegar. Let the whole thing stand for a moment. The soy milk should flake out a bit, that is desired.
Then add the mustard and salt and mix briefly with the hand blender. Pour in the oil in a thin stream while continuing to mix. The mayonnaise will be very firm.
Add the cooled vegetable broth with the onions and garlic to the mayo and puree finely. Season to taste with the remaining vinegar and possibly salt and herbs.