Mix cucumbers, onion, and salt together in a bowl. Cover with plastic wrap and let sit for 15 to 30 minutes.
Turn cucumber mixture into a colander set over a basin or in a sink. Let drain, stirring regularly, until most of the liquid and salt has drained, 15 to 30 minutes. Transfer drained cucumber mixture to a large basin.
Whisk mayonnaise, vinegar, sugar, dill, garlic powder, and pepper for dressing together in a bowl until smooth. Pour over cucumber mixture and toss till coated.
Pour over cucumber mixture and toss till coated.
Cover with plastic wrap and chill for 1 to 2 hours before serving.
Notes
Salting the cucumber allows the cucumber to ooze some liquid. If you are in a hurry, you can omit this step.