Infertility issues?

So my mother went through many years of trying to conceive my brother and I. What are the chances of me having fertility issues if my mother had it? Does it have anything to do with genes? My greatest fear is going through that trouble. I'm 25 and planning in having a baby around two years from now. I spoke to my doctor about it, she just told me to take prenatal pills to increase my chances. Any thoughts? Has anyone gone through this?

P.S- My mother tried everything under the sun to get pregnant. Even artificial insemination and that didn't work. After years of seeing doctors and being on medications she decided to just stop. A year later she got pregnant with my brother. ?