Did anything I do while I was pregnant cause me to have a pfo?

No. A patent foramen ovale (pfo) is present in all babies prior to birth and just after birth. This hole between the two upper chambers (right and left atrium) closes gradually over time, but in 1-in-7 people it never completely closes. If it is small, it is considered a normal finding. Rarely a PFO is larger than usual and needs to be closed with surgery or, more often, with a catheter procedure.
NO. A PFO is a congenital heart problem which occurs as the heart is switching over circulation from being inside of you and not sending blood to the lungs to being outside of you and now having to send blood to the lungs. You did nothing to cause it.