I play guitar and for one of my songs, the sheet music shows sharps for only higher notes and not the lower notes. Do I apply the sharps to the lower notes? For example, G on string 1 is a sharp but it doesn't specify that G on string 6 is a sharp.
That's the key signature, which tells which letter name notes are sharpened. There's only need to put a sharp sign there on the F line, and musos will assume all F notes throughout the piece are sharpened, regardless of which octave they're in., unless cancelled by the natural sign (♮). The same goes for the other sharps, and all flats, in flat keys.
In fact, just playing the piece with only the top line F sharpened, and others played as naturals, would sound rather strange, wouldn't it?
However, if you find a stray sharp, flat or natural sign in front of a note somewhere else, that only lasts for the bar, and is known as an accidental. The ones you ask about aren't accidentals, they're put there on purpose!
What you showed us is a key signature. It sharpens all F, C, G and D notes in all octaves.
But there are also 'accidentals'. They persist only until the next barline, and only at that exact pitch.
But, when that strict rule could cause confusion, a reminder 'cautionary accidental' is sensible. Required, even.