This study will look at the effects of CagriSema in people with both type 2 diabetes and painful diabetic peripheral neuropathy, compared to placebo. Participants will either get an active medicine or a "dummy" medicine (placebo). Which treatment participants get is decided by chance. In this study the active, investigational medicine is called CagriSema. Doctors cannot yet prescribe CagriSema. For each participant, the study will last for about 10 months.