Combine sugar, milk, butter, and cocoa powder in a large saucepan over medium heat; bring to a boil. Cook and stir until butter is melted and mixture is smooth, 2 to 3 minutes.
Remove from heat and add oats, peanut butter, and vanilla; mix until thoroughly combined. Drop tablespoonfuls of dough onto sheets of waxed paper. Let cool until solid, 20 to 30 minutes.