Patient description: A 16-year-old girl came to the clinic complaining of weight gain and abnormal menstrual cycles. Her BMI was 24, but she has gained 5 kg in the past few weeks. She gets tired more frequently and does not have energy to go dancing with her friends. Her lab results were remarkable for high TSH levels (15 mU/L) and low free T4 levels (0.18 ng/dl). Her anti-TPO levels were extremely high (136 IU/ml). She was diagnosed with Hashimoto disease. She does not smoke and she is not sexually active.

Clinical trial eligibility criteria: eligible ages (years): 12.0-999.0,  Locally Advanced Thyroid Gland Carcinoma Malignant Thyroid Gland Neoplasm Poorly Differentiated Thyroid Gland Carcinoma Recurrent Thyroid Gland Carcinoma Thyroid Gland Anaplastic Carcinoma Thyroid Gland Medullary Carcinoma Thyroid Gland Papillary Carcinoma Thyroid Gland Squamous Cell Carcinoma Patients with RET-altered thyroid cancer who present with locally advanced primary tumor, defined as T3 or T4 by imaging or invasive/bulky nodal disease, or with recurrent/residual invasive/bulky nodal disease will be enrolled in this trial, regardless of whether distant metastases are present or not At least 12 years of age on the day of signing informed consent Pathologic findings supporting the clinical impression of medullary thyroid carcinoma, papillary thyroid carcinoma, poorly differentiated thyroid carcinoma, or anaplastic thyroid carcinoma. Diagnosis of anaplastic thyroid carcinoma may consistent with or suggestive of terminology associated with: anaplastic thyroid carcinoma, undifferentiated carcinoma, squamous carcinoma; carcinoma with spindled, giant cell, or epithelial features; poorly differentiated carcinoma with pleomorphism, extensive necrosis with tumor cells present Having an activating RET gene alteration (fusion or mutation). The RET alteration result should be generated from a laboratory with Clinical Laboratory Improvement Act (CLIA), ISO/EIC, College of American Pathologists (CAP), or other similar certification that clearly denotes the presence of a RET alteration in tumor, or institutional-approved cell free DNA blood test for RET alteration Prior multikinase inhibitors (MKIs) with anti-RET activity are allowed. The specific agent(s), duration of treatment, clinical benefit, and reason for discontinuation (e.g., progressive disease [PD], drug toxicity, or intolerance) should be documented for all kinase inhibitors the patient has been exposed to At least one measurable lesion as defined by 1.1 Surgical morbidity/complexity score of 1 to 4 (moderate, severe, very severe, or unresectable) Eastern Cooperative Oncology Group (ECOG) performance status of 0 to 2 (age >=16 years) or Lansky Performance Score (LPS) >= 40% (age <16 years) with no sudden deterioration 2 weeks prior to study registration Absolute neutrophil count (ANC) >= 1500/uL Hemoglobin >= 9 g/dL (5.58 mmol/L)  An additional validated oncogenic driver that could cause resistance to selpercatinib treatment (if known) Prior treatment with a selective RET inhibitor(s) (pralsetinib [BLU-667], including investigational selective RET inhibitor[s]) Investigational agent or anticancer therapy (including chemotherapy, biologic therapy, or immunotherapy) within 5 half-lives or 3 weeks (whichever is shorter) prior to planned start of selpercatinib Exception: Patients with ATC No concurrent investigational anti-cancer therapy is permitted Major surgery (excluding placement of vascular access and diagnostic procedures) within 4 weeks prior to planned start of selpercatinib Exception: Patients with ATC Radiotherapy with a limited field of radiation for palliation within 1 week of the first dose of study treatment, with the exception of patients receiving radiation to more than 30% of the bone marrow or with a wide field of radiation, which must be completed at least 4 weeks prior to the first dose of study treatment Any unresolved toxicities from prior therapy greater than Common Terminology for Adverse Events (CTCAE) grade 1 at the time of starting study treatment with the exception of alopecia and grade 2, prior platinum therapy related neuropathy Symptomatic primary central nervous system (CNS) tumor, metastases, leptomeningeal carcinomatosis, or untreated spinal cord compression