“Is it really hard to get pregnant while being on the pill for a long time?”

My friend who is a med- student told me that it’ll be very hard for me to get pregnant if I am on the pill for 5 years or more lol. She said it’ll take more than 2 years to finally have a baby once you are off the pill.

I’m just curious if anyone got pregnant right away after they stopped the pill?