Inclusion Criteria:
* Primary psychiatric diagnosis of recurrent major depressive disorder, without psychotic features, based on clinical assessment using diagnostic and statistical manual of mental disorders (DSM)-5 criteria and confirmed with the mini international neuropsychiatric interview (MINI)
* Participant had to have at least one previous major depressive disorder (MDD) episode prior to their current episode
* Were first diagnosed with depression before the age of 55
* Are in a current episode of depression: Episode length must be at least 2 months but not longer than 24 months
* Have taken 0, 1, or 2 treatments for depression in your current episode
* Body mass index (BMI) within the range 18 to 35 kilograms per square meter (kg/m^2) at screening
Exclusion Criteria:
* Treatment with vagus nerve stimulation (VNS), electroconvulsive therapy (ECT), transcranial magnetic stimulation (TMS), deep brain stimulation (DBS), or ketamine/esketamine within the current or past major depressive episodes
* Current or past DSM-5 diagnosis of bipolar disorder, psychotic disorders, borderline personality disorder, antisocial personality disorder, or current obsessive-compulsive disorder
* Post-traumatic stress disorder within the past three years of screening
* Dementia, any dementing disease, intellectual disability, or neurocognitive disorder
* History of Alcohol and Substance use disorders within 6 months of screening, with the exclusion of nicotine, caffeine, and mild cannabis use disorder, according to the MINI and Clinical Assessment
* Known allergies, hypersensitivity, or intolerance to JNJ-89495120 or its excipients