Over two dozen beach closures were in effect on Sunday across Massachusetts, with elevated bacteria levels and harmful cyanobacteria blooms responsible for most of the advisories.