A Research Study of How Safe a New Medicine Called NNC0519 0130 is and to Test Its Effect in People Living With Excess Body Weight With or Without Type 2 Diabetes

A new study medicine called NNC0519-0130 to improve treatment options for people living with excess body weight, with or without type 2 diabetes. The purpose of the study is to investigate potential side effects and blood levels of NNC0519-0130, as well as changes in body weight, blood sugar levels, and heart activity. The study consists of two groups, with participants receiving either the study medicine (NNC0519-0130) or a placebo. Which treatment participants get is decided by chance and they can only participate in one group. Participants will be given the study medicine once weekly, and it should be taken on the same day each week. The treatment duration depends on the group participants are enrolled in, with the study lasting for 37 weeks for Group 1 and 34 weeks for Group 2.


Eligibility Criteria:
Inclusion Criteria:

* Informed consent obtained before any study-related activities. Study-related activities are any procedures that are carried out as part of the study, including activities to determine suitability for the study.
* Male or female of non-childbearing potential.
* Age 18-55 years (both inclusive) at the time of signing the informed consent.
* Considered eligible based on the medical history, physical examination, and the results of vital signs, electrocardiogram and clinical laboratory tests performed during the screening visit, as judged by the investigator.

Participants with obesity only:

* Body mass index between 30.0 kilogram per meter square (kg/m\^2) and 39.9 kg/m\^2 (both inclusive) at screening. Overweight should be due to excess adipose tissue, as judged by the investigator.

Participants with type 2 diabetes with either overweight or obesity:

* Body mass index between 27.0 kg/m\^2 and 39.9kg/m\^2 (both inclusive) at screening. Overweight should be due to excess adipose tissue, as judged by the investigator.
* Diagnosed with type 2 diabetes mellitus greater than or equal to (≥) 180 days before screening.
* Glycated haemoglobin (HbA1c) in the range of 6.5 percentage (%) (inclusive) and 9.5% (inclusive).

Exclusion Criteria:

* Any condition, except T2D and hypertension, which in the investigator's opinion might jeopardise participant's safety or compliance with the protocol.
* Presence or history of any clinically relevant respiratory, metabolic, renal, hepatic, gastrointestinal, endocrinological conditions (except diabetes mellitus and hypertension).
* Presence or history of cardiovascular disease including stable and unstable angina pectoris, myocardial infarction, transient ischaemic attack, stroke, cardiac decompensation, clinically significant arrhythmias or clinically significant conduction disorders.
* Participant is breastfeeding.

Participants with obesity only:

* HbA1c ≥ 6.5 % (48 millimoles per mol \[mmol/mol\]) at screening.

Participants with type 2 diabetes with either overweight or obesity:

* Uncontrolled and potentially unstable diabetic retinopathy or maculopathy. Verified by a fundus examination performed within 90 days before screening or in the period between screening and randomisation. Pharmacological pupil-dilation is a requirement unless using a digital fundus photography camera specified for non-dilated examination.
* Recurrent severe hypoglycaemia within the last year as judged by the investigator.
* Known hypoglycaemic unawareness as indicated by the investigator according to Clarke's questionnaire question 8.