The main purpose of this study is to see how orforglipron, compared with placebo, helps improve glycemic control in participants with obesity or with overweight and type 2 diabetes. This trial is part of the master protocol study J2A-MC-GZPO. Participation in the study will last about 18 months.