It's important to have a basic understanding of how a female dog's reproductive cycle works.
Every time a bitch goes into heat her body "thinks" it is pregnant for about 60 days- or the duration of what would have been a pregnancy. That means every body system (endocrine system, reproductive, nervous- brain) is preparing itself for pregnancy and birth. So ovarian cysts develop if no pups are present, oxytocin and other hormones prep for lactation-birth-mothering. It's a big deal for the bitch.
The long and short of it is that every time a bitch goes through an empty cycle, her risk of complications like ovarian cysts, pyometra, and mammary masses increases.
It is healthier for a bitch to be pregnant, than not to be pregnant, overall. An active breeding bitch generally does very well with pregnancies and is mentally and physically healthier for it (not recommending that everybody breed their dogs).
There is very little reason to leave a bitch intact if you will not be breeding her, and lots of reason not to. Go through several cycles so she is physically mature, but do some research on the risk of pyometra and mammary tumors/cancers.
Also, some thought should be given, I think, to the stress of false pregnancies on the dog's psyche.
And to answer the original question- I would recommend spaying at between 18- 24 months of age, but between cycles (2 months after her last cycle to 2 months before her next).