Typically, you would compute your effect size after you have completed your study based on statistical estimates of, for example, group means and standard deviations.
The free program G*Power (https://www.psychologie.hhu.de/arbeitsgruppen/allgemeine-psychologie-und-arbeitspsychologie/gpower) allows you to conduct "sensitivity analyses" in which you can compute the required effect size given fixed alpha, power (1 - beta), and sample size.