There are two approaches to learning all the notes on the neck.
The first way is to simply drill them into your head one at a time.
I’ve tried this on several occasions without much luck. The most that I could ever remember successfully were the notes on the top two strings.
That is when I realized the second method to learning all the notes which isn’t about memorizing every note on the neck, it’s about finding them quickly.
Using octave shapes and the notes on the top two strings I could easily find and name any note on the neck in a matter of seconds.
Memorize the notes on the top two strings starting with the notes on the 3, 5, 7, 9, and 12th frets. These have fret markers and are mostly natural notes without sharps or flats.
Use these fingerings to find different octaves of any note.
Use one of these two methods for identifying the note your looking for.