Step 1: Primary amenorrhea with cyclical abdominal pain is cryptomenorrhea: the girl is menstruating but the blood cannot escape because of an outflow obstruction.
Step 2: Retained blood forms a hematocolpos, which presents as a midline suprapubic swelling and a bulging mass felt on per-rectal examination, exactly as described.
Step 3: The commonest cause of this picture is an imperforate hymen, which classically shows a tense, bluish, bulging membrane at the introitus.
Step 4: A transverse vaginal septum can cause similar features but is much rarer. Vaginal agenesis and MRKH syndrome do not produce cyclical retained blood because there is no functioning lower outflow tract to obstruct in the same way, and MRKH has an absent or rudimentary uterus. So the most common answer is imperforate hymen.
Ref: Dutta Gynaecology, 6th ed, p. 42.