Inclusion Criteria:  Locally advanced (inoperable) and/or metastatic HER2-expressing cancer based on local or central laboratory test results as follows:  Parts 1 and 2: HER2-positive breast cancer as defined per American Society of Clinical Oncology (ASCO)/ College of American Pathologists (CAP) guidelines Parts 1 and 2: HER2-low breast cancer (defined as immunohistochemistry [IHC] 1+ or IHC 2+; AND is not HER2-positive per the ASCO/CAP guidelines) Part 2: HER2-positive gastroesophageal adenocarcinoma as defined per the ASCO/CAP gastric cancer-specific guidelines; other HER2-overexpressing non-breast cancers (defined as IHC 3+; or IHC 2+ and in situ hybridization [ISH]+) per the ASCO/CAP guidelines for breast cancer  Progression after or during the most recent systemic regimen of treatment for advanced cancer. For both Part 1 and Part 2, prior therapies must have included approved agents known to confer clinical benefit.  Subjects with HER2-positive breast cancer who did not receive trastuzumab or pertuzumab due to medical contraindications will not be eligible for this study Subjects with HER2-low breast cancer who have received prior HER2-targeted therapy will not be eligible for this study Measurable disease per Response Evaluation Criteria in Solid Tumors version 1.1 (RECIST 1.1) Willingness to undergo a new biopsy to provide a tumor tissue for central laboratory testing of HER2 protein expression and gene amplification by IHC and ISH assays, respectively Eastern Cooperative Oncology Group (ECOG) performance status of 0 or 1 Adequate organ functions Adequate cardiac left ventricular function, as defined by a left ventricular ejection fraction (LVEF) ≥ 50% as determined by either echocardiogram or multiple gated acquisition scan (MUGA) obtained within 4 weeks prior to first dose of study treatment  Exclusion Criteria:  Previous allogeneic stem cell transplant Prior treatment with any anti-CD47 or anti-signal regulatory protein alpha (SIRPα) agent Prior or concurrent invasive malignancy whose natural history or treatment has, in the opinion of the investigator or medical monitor, the potential to interfere with the safety or efficacy assessment of the investigational regimen Received systemic anticancer therapy within 4 weeks of starting study treatment (6 weeks for mitomycin C or nitrosoureas). Received radiotherapy within 2 weeks of the first dose of zanidatamab/evorpacept (ALX148) Untreated brain metastases, symptomatic brain metastases, or radiation treatment for brain metastases within 4 weeks of start of study treatment Known leptomeningeal disease Active hepatitis Infection with human immunodeficiency virus (HIV)-1 or HIV-2. (Exception: Subjects with well controlled HIV [e.g., CD4 > 350/mm3 and undetectable viral load] are eligible.) QTc Fridericia (QTcF) > 470 ms History of myocardial infarction or unstable angina within 6 months prior to enrollment, troponin levels consistent with myocardial infarction, or clinically significant cardiac disease, such as ventricular arrhythmia requiring therapy, uncontrolled hypertension, or any history of symptomatic congestive heart failure Acute or chronic uncontrolled pancreatitis or Child-Pugh Class C liver disease