Place potatoes in a large pot, cover with cold water, add salt, and bring to a boil
Cook until fork-tender, about 18–20 minutes
Drain potatoes well and return them to the hot pot for 1 minute to steam dry
Mash potatoes until smooth but not gluey
Gradually stir in melted butter and warm heavy cream
Add sour cream and cream cheese, mixing until fully incorporated
Stir in shredded cheese, garlic powder, and onion powder
Season with salt and black pepper to taste
Preheat oven to 375°F
Transfer potato mixture to a greased baking dish
Sprinkle extra cheese on top if using
Bake uncovered for 20–25 minutes until set and lightly golden
Let rest 5 minutes before serving