Since fungi can infect the central nervous system due to injections, why do some vaccines contain gmo saccharomyces cerevisiae?

Yeasts. The explanation is a little complicated for the space we have here but the species you mentioned is a common yeast used in wine and bread making. The same way not all bacteria are bad (some of them necessary for gastrointestinal health) other organisms are not bad and can be used for medical purposes. We eat this organism all the time without consequences.
It's dead, Jim... :) the yeast is modified to produce the protein that we need in the vaccine; after that, the yeast is killed, taken apart, and all but the desired protein discarded. There is no live yeast in the vaccine, and if it weren't gmo it would be useless for the purpose.