While preparing for pregnancy, men should avoid certain foods and bad habits to avoid affecting sperm quality. For example, fried chicken, beer, etc. may contain harmful substances, while high-caffeine and high-sugar foods may have adverse effects on sperm. In addition, maintaining good living habits and appropriate exercise can also help improve sperm quality and create favorable conditions for successful pregnancy.