if you have bad anxiety can you still get pregnant?

so i have really bad anxiety. im on medication. also i have bad insomnia. does that affect my chances of getting pregnant ?