All music theory begins with the “1, 2, 3” or “do, re, mi” of a major scale. Everything, even other scales that have nothing to do with the major scale, gets named in relation to it. Therefore, it’s essential that you understand how to construct a major scale as your first step in understanding music theory.
A major scale is nothing more than a series of Tones and Semi-Tones - writing the natural notes from C to C will create a C major scale.
This same pattern can be applied to any set of 8 consecutive notes. For example, if the natural notes between G to G were written, F would have to be raised a half step to F sharp in order to create the formula needed to make a major scale.