A sharp printed in a key signature is not confined to the single note beside it. It establishes a convention for the relevant pitch name in the passage, until later notation changes or overrides it.
For example, the one-sharp signature associated with G major includes F sharp. An F elsewhere in the relevant staff is read in that context even when a separate sharp is not printed beside each occurrence. Open Music Theory’s chapter on major scales and key signatures explains the system and its patterns.
Read the opening before the notes
When beginning a score, identify the clef, key signature and time signature before following the melody. These provide different kinds of information; a time signature does not tell you which pitches are sharpened.
Then watch for local accidentals and changes of key signature. A natural sign beside a note may alter what the key signature would otherwise imply, according to notation conventions.
Do not use the signature alone as a complete analysis of a piece’s key or musical character. Related keys can share a signature, and music can move through different tonal areas.
For an introductory exercise, find three occurrences of the same letter name at different octaves and explain how the signature applies. This turns a group of symbols near the clef into a rule you can follow across the page.

