Whisk the egg yolk, salt, sugar, and pepper together until well blended and the yolk lightens in color — this is your emulsion base.
Whisk in the vinegar, lemon juice, and water (and the Dijon mustard, if using).
While whisking constantly, drizzle in the oil very slowly — a drop or two at a time to start. Once about half the oil is incorporated, add the rest in a thin, steady stream. Don't stop whisking. The finished mayonnaise won't be as thick as store-bought. Refrigerate it for at least half an hour before using — it firms up as it chills.
Stir, then taste for seasoning. If needed, whisk in a bit more salt, sugar, or vinegar. Give it a minute before tasting — salt takes a while to fully dissolve in the oil.