This study will look at how well CagriSema helps people with excess body weight lose weight. CagriSema is a new medicine developed by Novo Nordisk that combines cagrilintide and semaglutide. CagriSema cannot yet be prescribed by doctors. In the study, participant will either get CagriSema or dummy medicine and which treatment participant get is decided by chance. The study will last for about 1½ years for each participant.