Menopause is the time when you exhaust the supply of follicles in the ovaries and thus stop ovulating and hence menstruating. Once you have gone 12 months without a period, you can be termed as menopausal. The time before menopause when your periods get irregular is the time of perimenopause.
White it is difficult to get pregnant around this time because of both annovulatory cycles and aged ova which are unlikely to result in a pregnancy, pregnancy is not entirely impossible. There could be rare instances when a sudden and random ovulation may result in a pregnancy.
Therefore, to avoid an unwanted pregnancy, it is recommended that you continue using contraception for about one year after you have gone through a full year without a period. Your healthcare provider can guide you on the most suitable contraceptive options based on your individual circumstances and preferences.