Guitar Note Names Names on Fretboard
Simply put, we need to know this. In this view, we have the chromatic scale on individual strings. Each string starts from a different point in the scale [except for 6 & 1 strings that share E as a starting point].
This is one way to ‘getting to know’ all of tone names at every fret. Play each tone, fret by fret on every string, as you say the name. A good way to start is to say the sharp names [for the sharps/flats] on the way as you ascend, & the flats as you descend. Then do the opposite: say flat names on the way up, & the sharp names on the way down.

This process adds to our linear understand of the fretboard. The chromatic scale, as our musical ruler [12 tones, rather than inches], is how we measure in a line.
Notice that B goes directly to C, & E goes directly to F [naturally occurring half steps]. All of the other pairs of naturals have a sharp/flat between them. When a tone, scale, chord, or key have different names, yet are the same, this is called enharmonic equivalents.
