Bring a large pot of salted water to a boil. Add the spaghetti or noodles and cook according to package instructions until al dente. Reserve 1/2 cup of the pasta cooking water, then drain the noodles and set aside.
In a frying pan or wok, heat the olive oil over medium heat. Add the minced garlic and sauté for 1-2 minutes until fragrant, being careful not to burn it.
Stir in the soy sauce, sesame oil, red pepper flakes, and brown sugar into the pan with the garlic, mixing well. Cook for another minute until heated through.
Add the drained noodles to the frying pan, tossing to coat them in the garlic sauce. If the mixture seems dry, gradually add some of the reserved pasta cooking water to achieve the desired consistency.
Remove from heat and stir in the chopped green onions and cilantro, if using. Adjust the salt to taste.
Serve the vegan garlic noodles immediately in bowls, garnishing with extra green onions or cilantro if desired.