Inclusion Criteria:  Informed consent obtained before any trial-related activities. Trial-related activities are any procedures that are carried out as part of the trial, including activities to determine suitability for the trial Men and women 18 to 74 years of age (both inclusive) at the time of signing informed consent  Diagnosed with type 2 diabetes for at least six months  Treated only with diet and exercise or stable metformin treatment for at least 3 months and be willing to continue the metformin dose during the trial HbA1c ≥58 to ≤91 mmol/mol for patients treated with diet and exercise HbA1c ≥53 to ≤91 mmol/mol for patients treated with metformin BMI ≥27 to ≤50 kg/m2 Stable body weight (less than 3 kg self-reported change during the previous 90 days)  Exclusion Criteria:  For an eligible participant, all exclusion criteria must be answered "no".  Diagnosed with type 1 diabetes Known or suspected hypersensitivity to trial product or related products Acute decompensation of glycaemic control requiring immediate intensification of treatment to prevent acute complications of diabetes (e.g. diabetes ketoacidosis) which required help from doctor or hospitalisation within 90 days prior to screening Previous participation in this trial. Participation is defined as signed informed consent Participation in another clinical trial within 90 days before screening Woman who are pregnant, breast-feeding or intends to become pregnant or is of child-bearing potential and not using adequate contraceptive methods (intrauterine devices or hormonal contraception (oral contraceptive pills, implants, transdermal patches, vaginal rings or long-acting injections)) Prior treatment with GLP-1RA Participation in an organised weight reduction programme within 3 months before screening Any disorder which in the investigator's opinion might jeopardise participant's safety or compliance with the protocol Anticipated change in lifestyle (e.g. eating or exercise pattern) during the trial  Any laboratory safety parameter at screening outside the below extended laboratory ranges, see laboratory manual for specific values  Albumin outside lower normal limit (LNL) -5% and upper normal limit (UNL) +5% Alanine aminotransferase (ALT) outside LNL -100% and UNL +50% Creatinine outside UNL +10% Haemoglobin outside LNL -5% and UNL +10% Leukocytes outside LNL -20% and UNL +20% Thrombocytes outside LNL -15% and UNL +15% Bilirubin (total) outside UNL +15% Amylase ≥ UNL +100% Untreated or uncontrolled hypothyroidism/hyperthyroidism defined as thyroid-stimulating hormone (TSH) <0.4 mIU/L or > 6 mIU/L Obesity related to endocrinologic disorders (e.g. Cushing Syndrome) Any blood draw in excess of 25 mL in the past month, or donation of blood or plasma in excess of 400 mL within the 90 days preceding screening  Use of any prescription or non-prescription medication (apart from oral contraceptives, routine vitamins, occasional use of paracetamol, acetylsalicylic acid, or ibuprofen) which could interfere with pharmacokinetic or pharmacodynamic results, as judged by the investigator, such as:  herbal products and non-routine vitamins Glucose lowering medication (except metformin) medication that may cause weight gain, including systemic corticosteroids, tricyclic antidepressants, and atypical antipsychotics orlistat, zonisamide, topiramate, phentermine, lorcaserin, bupropion, naltrexone or other weight loss drugs Blood pressure and lipid lowering agents (e.g. statins) drugs are allowed if treatment has been stable for ≥ 1 month prior to screening and treatment should preferably be kept unchanged during the trial Personal or family history of medullary thyroid carcinoma or multiple endocrine neoplasia type 2 History of pancreatitis (acute or chronic) History of major depressive disorder or other severe psychiatric disorders, e.g. schizophrenia or bipolar disorder within the last 2 years or lifetime history of suicide attempt Surgery scheduled for the trial duration period, except for minor, non-gastrointestinal surgical procedures at the discretion of the investigator Sitting blood pressure (after resting for at least 5 minutes) ≥160 mmHg systolic or ≥ 100 mmHg diastolic or heart rate of ≥ 90 beats/min after resting for at least 5 minutes (if white-coat hypertension is suspected, one repeat measurement is allowed; last measure being conclusive and to be recorded in the case report form (CRF)) Cancer (past or present, except basal cell skin cancer or squamous cell skin cancer), which in the investigator's opinion could interfere with the results of the trial Known or suspected alcohol abuse within 1 year from screening (defined as regular intake of more than 14 units weekly for men and 7 units weekly for women - one unit of alcohol equals about 300 mL of beer or lager, one glass (100 ml) of wine, or 25 ml spirits) or a positive result of an alcohol test Known or suspected drug/chemical substance abuse within 1 year from screening Smoking or use of nicotine products within the last three months prior to screening Inability or unwillingness to perform self-injection at the screening visit (with a placebo test pen) Mental incapacity, language barriers or unwillingness to comply with the requirements of the protocol, which may preclude adequate understanding or co-operation during the trial, as judged by the investigator Investigator, any sub-investigators, research assistants, pharmacist, trial coordinators, other staff, sponsor staff or relatives thereof directly or indirectly involved in the conduct of the trial cannot participate in the trial