Thinly slice the potatoes into rounds about ⅛-inch (3 mm) thick. Submerge in a large bowl of water to keep from browning and set aside.
In a medium pot over low heat, melt the butter. Once the butter begins to foam, add the garlic and cook for 2-3 minutes, until fragrant. Add the flour and stir until flour and butter resemble the consistency of wet sand, creating a roux.
While stirring continuously, add the non-dairy milk, vegetable broth, salt, and pepper and bring to a boil. Stir in the nutritional yeast and continue to cook for 2-3 minutes, or until the sauce thickens. Remove from the heat.
In a medium baking dish, add 2 layers of the sliced potatoes, followed by a layer of the sliced onions. Pour on half of the cheese sauce and spread with a spatula to coat all of the potatoes and onions. Add another 2 layers of potatoes and pour on the remaining cheese sauce.
Cover with a lid or foil and bake for 1 hour. Then, uncover and bake for 10-15 minutes more, until the top is golden and bubbling and the potatoes are tender.