Some frets on the grid have 2 names. These are called enharmonics. Enharmonic means same note, different name.
The sharp - raises any tone one half step, & the flat - -lowers any tone one half step.
One half step = one fret on the guitar. Naturally occurring half steps (natural half step to another natural) are between B/C & E/F. [E# = F; E = Fb; B# = C; B = Cb].
It can be a challenge to learn notes on guitar (tone-names of the frets) in standard tuning, especially in the upper positions. Below are things to do to help us remember. We repeat the list until we 'can't not know it'. This list is specifically for standard tuning, yet it can be applied it to any tuning.
Name tone-names (vocally & subvocally) on each string using the chromatic scale going up each fret. Say the tone-name, repeat on each string in multiple passes. Visual this naming process when away from the guitar.
Find & compare unisons [what can be called equivalents]. Make sure they are what they are. Example: the high E is…1, open; 2nd string, 5th fret…3rd string, 9th fret, etc. Find every tone on the fretboard where they exist [equivalents]. Double check - compare. Know the board. Only the low E, F, F#, G, & G# on the 6th string appear once.
Make maps – Blank fretboard PDF - a pencil & a picture is always sticky.
Map the octaves.
Name each tone in a fret space (across the strings)…1st fret low to high…F, Bb, Eb, Ab, C, F [all Perfect 4ths, save 3 to 2, which is a Major 3rd]. Consider enharmonic names as well. Go through every fret space.
And finally, play all 7 of the C Major scale patterns, saying the tone-names aloud as the tones are sounded. We can start on the root C & play to C in each pattern, then play all of the tones for each of the 7 (including the tones below & above the lower & upper roots).
Visualize the fretboard when away from the guitar. Print out the tab, and write down the names. Check it. Repeat.