Cancer of the uterus can arise from the upper part (body of the uterus), which is usually endometrial cancer, and from the lower part (cervix). You have not mentioned which type of cancer your cousin sister suffered from. There can be a genetic predisposition to endometrial cancer; however this is an extremely rare situation, and usually occurs in the Lynch Syndrome. Please check whether or not any person in your cousins family - aunt, other cousins, uncle etc suffered from breast, ovarian, colon (large intestine) & rarely cancer of kidney. This history can indirectly point to the fact that there is a genetic predisposition to any of the cancers I mentioned, including endometrial cancer. Even if any of these cancers is present, you have to consult a genetist who may be able to suggest some further tests to prove or disprove the genetic predisposition.
A 23 year old woman suffering from the first episode of heavy bleeding is usually not serious, and can be due to hormonal imbalance. You have not mentioned what the menstrual pattern was in subsequent months - I guess it was normal. You have also not mentioned whether or not this 23 year old lady is married. If the problem recurs then ultrasonography (USG) of the uterus and ovaries is essential, and if the lady is married, she should undergo an endometrial biopsy. If she is unmarried, further treatment without biopsy can be done medically depending upon the USG report and some other factors which the gynaecologist will look into during examination. Remember, if your cousin's daughter has an ovulatory type of hormonal imbalance, she must get it treated with progestogens and ensure that the problem is treated. In very, very few persons this type of hormonal imbalance if left untreated can develop into endometrial cancer. The pathology of the endometrial biopsy would reveal adenomatous or complex endometrial hyperplasia with atypia prior to development of cancer. If such a report is seen in women who have completed their families, and have a first degree relative who suffered from endometrial cancer, it better to have the uterus removed - i.e. hysterectomy. USG and endometrial biopsy (which can be done under hysteroscopic guidance) can detect endometrial cancer early. The Pap smear is good for detecting cervical cancer at the preinvasive stage (stage 0), but is not good for endometrial cancer.