2 tablespoons unsalted butter (1/4 stick), plus extra for coating the baking dish
6 scallions, ends trimmed and white and light green parts thinly sliced
1/2 medium yellow onion, finely chopped
3 medium garlic cloves, finely chopped
2 1/2 teaspoons kosher salt
1/2 teaspoon freshly ground black pepper
1 3/4 cups long-grain rice
3 cups low-sodium chicken broth
1 cup heavy cream
1 1/2 cups shredded extra-sharp white cheddar cheese
Heat the oven to 350°F and arrange a rack in the middle. Coat a 13-by-9-inch baking dish with butter and set aside.
Melt butter in a large frying pan over medium heat. When it foams, add scallions, yellow onion, garlic, 1/2 teaspoon of the salt, and pepper. Cook, stirring occasionally, until vegetables are tender but not browned, about 7 minutes.
Add rice and stir to coat in butter. Add broth, cream, and remaining 2 teaspoons salt. Bring to a simmer, stirring frequently. Remove from heat, stir in 1 cup of the cheese, pour into the prepared dish, and spread evenly. Cover with aluminum foil and bake until most of the liquid has been absorbed and the rice is almost cooked, about 30 minutes.
Uncover, evenly sprinkle remaining 1/2 cup cheese over top, and continue baking until rice is tender and cheese is golden, about 15 to 20 minutes more.