Wish we knew! Yours is the million $ question with no answer. Family history and environment play their roles, but there is no easy checklist of things to do and avoid. If there is a strong family history of autism spectrum in your or your partner's family, your chances would be higher, so some people choose to adopt in those cases. The best path, though, is to live healthy and love the child you get!
No prevention. Since autism has no known cause, there is no known prevention. Specifically, avoiding vaccines will not prevent vaccination. Avoiding vaccines merely increases your risk of dying from communicable illness.