When I go toilet to urinate or bowel movement sometimes it causes pain in front of pelvis? Is that ovarian cancer or something?

Probable cystitis. Ovarian and other cancers in pelvis rarely associated with pain unless there is bowel obstruction from mets. pain on urinating mostly from inflammation in bladder. Urine analysis , colonoscopy and cystoscopy needed if urine analysis doesn't resoslve issue.