Heat ¼ cup vegetable oil in a large skillet with a lid over medium. Cook 4 garlic cloves, finely chopped, stirring, until softened and barely golden, about 1 minute. Add 1 medium onion, finely chopped, and 1 tsp. Diamond Crystal or ½ tsp. Morton kosher salt and cook, stirring often, until translucent, about 5 minutes. Pour in ⅓ cup cold water, cover pan, and reduce heat to low. Cook, checking once or twice to avoid burning, until onion is very soft, about 5 minutes.
Uncover pan and, using a potato masher, gently smash onion until smooth (the water should have evaporated and the oil risen to the surface). Stir in 1 tsp. Kashmiri chile powder, 1 tsp. ground coriander, ¾ tsp. ground turmeric, ½ tsp. cayenne pepper, and ½ tsp. ground cumin. Cook, stirring, 1 minute, then add ⅓ cup water and bring to a gentle simmer. Immediately add 1 lb. green beans, ends trimmed, cut into 2″ pieces. Re-cover pan, increase heat to medium-low, and cook until crisp-tender, 6–8 minutes.
Add 1 serrano chile, thinly sliced, 1 lb. medium shrimp, peeled, deveined, and remaining 2 tsp. Diamond Crystal or 1¼ tsp. Morton kosher salt, re-cover pan, and cook until shrimp are opaque, about 5 minutes. Remove from heat and top with ¼ cup chopped cilantro.
Serve stir-fry with steamed basmati rice and lemon wedges for squeezing over.