Abortions can occur because of various reasons. These can be foetal abnormality, genetic causes, Rhesus blood group
incompatibility and low progesterone hormone, infection of the uterus, endometriosis, fibroids, etc. Many times the cause is difficult to pin-point. In your case it can be because of rhesus incompatibility.
When you plan your next pregnancy it must be after thorough counselling and prenatal medicines must be taken.