Welcome to e health forum.
It is not clear why you have been on contraceptive medications. In case, if it was to treat problems like irregular cycles, then taking the pill as advised by your doctor would help in getting regular ovulatory cycles normally. But this may take a while, so you need to be patient.
Irregular periods are usually due to abnormal hormone levels, and ovulation is usually absent during those cycles. Hence such cycles are considered anovulatory cycles. Hence pregnancy is not possible in such conditions.
Once you take the pill for 2-3 months, the normal gonadotrophin secretion from the pituitary gland will result in normal pattern of menstrual cycles, and onset of normal ovulation, hence increasing chances of pregnancy.
In case of any doubts consulting with your doctor for proper advice and counselling would be helpful.