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:

Dr. Karen Becker has a thorough and informative video on the subject:

With a corresponding article:

Some additional “light reading”: