First timer q's

Hi guys ! I have just started having sex and I was just wondering if I had the basic facts right. You have 6 fertile days in each cycle where you can get pregnant, the 5 leading up to ovulation because sperm can live in you up to 3-5 days and the day of ovulation. I am aware that the egg from ovulation can last 12-24 hours, but my doctor said after ovulation that's the end of my fertile window and chance of pregnancy is gone so don't count the day after as a 7th day. ? Also if you have a regular 32 day cycle like me is the counting methods and going with my ovulation being on the 18th day every month reliable?, all my apps seem to be in sync and pretty accurate with that but just making sure I want to be safe.