This is an incredibly controversial subject. Different vets you talk to will give you different recommendations and posts on this frequently devolve into massive arguments. The latest research shows that waiting until at least 1 year of age, preferably 2 years will reduce the risks of several health issues associated with Spay or Neutering. There are, however, many reasons a dog may get spayed or neutered before this age, from behavioral issues to the difficulties around preventing accidental puppies.

Recent Research: https://www.ucdavis.edu/news/early-neutering-poses-health-risks-german-shepherd-dogs-study-finds/

Dr. Karen Becker has a thorough and informative video on the subject: https://www.youtube.com/watch?v=enPCZA1WFKY

With a corresponding article: http://healthypets.mercola.com/sites/healthypets/archive/2013/09/30/neutering-health-risks.aspx

Some additional “light reading”: