Arrange a rack in the middle of the oven and heat to 350°F. Lightly grease a 9x13-inch baking dish with butter; set aside.
Place 3 pounds peeled and chopped russet potatoes in a large saucepan and add enough cold water just to cover. Add 1 tablespoon of the salt. Cover and bring to a rolling boil over high heat, about 10 minutes. Uncover and continue to boil until the potatoes are tender but not falling apart, 6 to 7 minutes. Drain.
Melt the 4 tablespoons butter in the now-empty pot over medium heat. Add 4 thinly sliced scallion whites and cook until beginning to soften, about 2 minutes. Add 4 minced garlic cloves and cook until fragrant, 30 seconds to 1 minute more.
Add 1/4 cup all-purpose flour and stir until light golden brown, 1 to 2 minutes.
While whisking constantly, slowly pour in 3/4 cup low-sodium chicken or vegetable stock, followed by 1 cup whole milk. Bring to a simmer. Continue to cook, stirring continuously, until thickened, 3 to 4 minutes. Remove from the heat.
Whisk in 1 cup sour cream, 1/2 teaspoon freshly ground black pepper, 1 1/2 cups of the grated extra-sharp cheddar cheese, and remaining 2 teaspoons salt.
Add the drained potatoes and stir to coat. Transfer the mixture to the prepared baking dish.
Toss together 2 cups crushed cornflakes cereal, 4 tablespoons melted unsalted butter, 4 thinly sliced scallion greens, and remaining 1/2 cup cheese in a medium bowl.
Scatter the cornflake topping evenly over the potatoes.
Bake until the center of the casserole is bubbling and the cheese is melted and beginning to brown in spots, 45 to 50 minutes.