Hello. Welcome to HCM.
Now that you have started having periods, it may not be possible to accurately diagnose the cause for a 3 month amenorrhoea, Commonly the cause can be pregnancy
leading to abortion
now, or even presence of some ovarian cyst
which may be now regressed or burst.
The best approach will be to have an ultrasound
immediately as well as when period stops, so that whatever is the cause can be best decided.