Heat olive oil in a large dutch oven over medium heat. Add the onion and cook, stirring occasionally, for 5 minutes.
Add the garlic and cook, stirring, for 1 minute.
Add the remaining ingredients except for the beans and stir until well combined.
Add the beans and stir until incorporated.
Cover with foil or the lid of the pot and bake 45 minutes.
Uncover and bake an additional 30 minutes or more. The beans are ready when they’re hot and the sauce has thickened, but you can continue cooking if you prefer a thicker sauce.
Notes
Tips for customizing vegetarian baked beans
Add a small splash of liquid smoke or a ½ teaspoon of smoked paprika
Include sriracha in the sauce or drizzle it over the top when finished for a spicy kick
For thicker sauce, bake an additional 30 minutes - 3 hours, covered with foil, removing the foil in the last 30 minutes of cooking
Meat eaters can add cooked, crumbled ground beef or diced bacon