With larger breeds I would be more cautious as the risk of incontinence later in life can rise if large breed bitches are spayed too soon.
But I wouldn't worry about a smaller dog much.
It's not just larger breeds, My Mother had one of my bitches when she was about 3 years old (she fought with my other girls, so it was best for to go & be the only dog) She had had 2 litters, after a little while my Mother decided to have her spayed, she recovered quite quickly, but always had a problem with incontinence, which had to be contolled, or helped with drugs.
She's not with us anymore & the incontinence was a problem for the rest of her life.
Having said all that, she has another of my bitches (had this one from a baby)
she has also been spayed, she is now 4 years old & has had no probs, touch wood.