Place 2 lbs fingerling potatoes in a large pot and cover with water by 1 inch. Season water generously with salt.
Bring to a rolling boil over medium-high heat and boil for 15-18 minutes until fork tender.
Drain potatoes in a colander and let sit 5-10 minutes until completely dry, shaking halfway through.
Meanwhile, preheat oven to 450F and grease a sheet pan with olive oil.
Spread dried potatoes on the sheet pan and drizzle with 1/4 cup olive oil.
Sprinkle 2 tsp garlic powder, 2 tsp onion powder, 3/4 tsp paprika, and 1/2 tsp cayenne over potatoes and toss until well-coated.
Using a flat-bottomed glass, gently smash each potato until about 1/2-inch thick.
Spread smashed potatoes 1/2 to 1 inch apart on the sheet pan.
Bake for 20 minutes, flipping halfway through.
While potatoes bake, combine 1/4 cup butter, 1 1/2 Tbsp minced garlic, and 1 Tbsp minced rosemary in a microwave-safe bowl and microwave for 30 seconds until butter melts.
After 20 minutes, remove sheet pan and spoon garlic butter evenly over each potato.
Bake for another 5-10 minutes until garlic is fragrant and bottoms are very crispy.
Transfer to a serving platter and sprinkle with flaky salt if desired.