It all has to do with the magnetizing field that the core of your xformer is capable of handling. For laminated EI cores this field is around 1T (one tesla). More or less than that depending on your application and core material. For ferrite cores, this can be around 0.4T, for example.
One trick is to design your xformer to maintain this field within specs.
The field is directly proportional to the primary voltage, and inversely proportional to the transversal area of the core, the number of turns and the frequency.
For standard EI cores, the core area also defines the area of the two wire windows, since their proportion is fixed.
So, more power, more area (thicker wire). More area, less need for turns. Higher frequency? The same thing. Less need for turns. Or area.
Another trick is to find the right core size so the windings can just fit inside the windows.
Here's a video I did explaining how these calculations are made.
Please, excuse the computer generated voice. I'm too shy.