In this study we will be looking into how CagriSema influences metabolism (the process by which food is used to supply energy for the body) compared to a diet. CagriSema is a new investigational medicine. CagriSema cannot yet be prescribed by doctors but has previously been tested in humans. The study is split into 2 parts. In the first part of the study, participants will either get CagriSema or a weight loss diet (calorie reduced). In the second part of the study,all participants will get CagriSema. Which treatment participants get in the first part of the study is decided by chance. Like all medicines, the study medicine may have side effects. The study will last for about 1.5 years.