Inclusion Criteria:  ASA I, II or III. Body mass index (BMI) <35 kg/m2. Scheduled at least 6 days prior to surgery to allow adequate time for the baseline assessment. Planned admission to the hospital for at least 2 days.  Exclusion Criteria:  Active delirium diagnosed with the Confusion Assessment Method (CAM). Mild cognitive impairment or dementia diagnosed with the Spanish-language version of the Montreal Cognitive Assessment MoCA-S1-2 score (score <20 points). In case the patient cannot answer the MoCA test, the instrument AD8-Ch will be applied. Hospitalization within 3 months prior to enrollment to minimize risk of recent delirium history. Severely frail condition defined with the Clinical Frailty Scale (CFS ≥7). Inability to perform cognitive tests due to legal blindness or severe deafness History of schizophrenia or psychosis. Harmful alcohol use or alcohol dependence (AUDIT score ≥16 considering the standard drink equivalent determined by MINSAL). History of benzodiazepines or marihuana consumption (more than 3 days per week). Unable to pass assessment for capacity to provide informed consent. Claustrophobia.