This study checks how a new type of insulin, called *icodec*, works for people with type 2 diabetes. *Insulin icodec* is taken once a week. It is compared to an older insulin, called *insulin glargine*, which is taken every day. Participants will either get weekly *insulin icodec* or daily *insulin glargine*. A small needle is used to inject the insulin under the skin, usually in the thigh, upper arm, or stomach. The study lasts about 9 months, but participants will only take the medicine for 6 months. Participation is decided by chance, like flipping a coin, to see which insulin they get.
- **Study Duration**: 9 months total, 6 months on medicine.
- **Participation Requirements**: Diagnosed with type 2 diabetes for at least 180 days and meet certain health criteria.
- **Exclusions**: Recent heart issues, diabetic eye problems, and certain medications.