Pregnancy after giving birth

Ha

At my postpartum check up my midwife mentioned that I could get pregnant quickly if I start having sex again. I’m 1 month PP today and she gave me the go ahead to have sex when I feel ready. Is it true you can get pregnant this soon after giving birth, even if you’re breastfeeding? I’ve heard breastfeeding keeps you from getting pregnant but I don’t believe it. Any moms get pregnant this soon while breastfeeding? I’m obviously going to be safe if I do anything but I’m just wondering. Thanks :)