Get fit, stay hydrated, try to stay a night at elevation to acclimate and my doctor gets me Diamox.
this is good advice. in addition i'll mention that some people are predisposed to AMS, HAPE or HACE more than others. I've seen prime of their lives 20 year olds that exercise daily at high intensity become symptomatic when less fit people remain asymptomatic. so, train you body, treat it right, hope for the best and plan for the worst. get the script -- https://www.everydayhealth.com/drugs/acetazolamide