The effect size will come from subject matter considerations (prior studies, theory, knowledge of similar variables and so on).
One of the considerations is what would be a smallest "substantive" effect, one big enough to be considered important. You are trying to identify an answer to the question "what is the effect size that you want to have an 80% chance* of picking up?".
* (or whatever other power you put in to the calculation; there's nothing special about 80% even if it's widely used in psychology).
To answer that question, you'd at a minimum need to figure out what sort of effect size people in that subject matter area might care about. That will depend on many things.
If you choose a large effect size and base your sample size calculation on that, any smaller effect sizes will be less likely to be identified, so you risk having too small a sample size to spot it.
So you also need to have an idea (from subject matter knowledge, as above) how large an effect of this kind might tend to be (others with similar subject matter knowledge will presumably also consider it a likely effect size or can be convinced of it from an argument that relies on that shared understanding of the subject).
Guessing much to small will result in unnecessarily huge sample sizes, and guessing much too large risks wasting the study.
Note that Cohen (1992) "A power primer" said:
My intent was that medium ES represent an effect likely to be visible to the naked eye of a careful observer. (It has since been noted in effect-size surveys that it approximates the average size of observed effects in various fields. ) I set small ES to be noticeably smaller than medium but not so small as to be trivial,
... so Cohen's "small" effect size would relate to the first thing I mentioned (an effect size "people will care about"), while (by his parenthetical comment) his "medium" one is closer to typical effect sizes in that subject area (the second criterion I discussed); this will typically be larger than effect sizes people care about (otherwise they're in a subject area where they won't find many of the actual effects that exist worth caring about).