Toss shrimp with kosher salt and finely grated garlic in a medium bowl. Let rest briefly.
Heat olive oil and sliced garlic in a 12-inch skillet over medium heat until garlic turns light golden, about 3 to 4 minutes. Do not brown.
Stir in red pepper flakes if using and cook for 15 seconds.
Add shrimp in a single layer and cook about 2 minutes per side until opaque and just cooked through.
Remove from heat and stir in chopped parsley and sherry vinegar or lemon juice.
Transfer to serving dish and serve hot with crusty bread.
