My advice is to start singing intervals, like octave, fifth, major/minor third. Then singing natural major and natural minor. After you get them in your memory you may choose different scales, like harmonic minor, nat.major modes, melodic minor etc. You have to sing them in every key, so it would be 12 versions of each scale.
Once you get enough of practice, you’ll notice that that scales are built on some particular rules. To simplify it we may reduce them to 2 rules:
- Any of these scales includes all letters: A,B,C,D,E,F,G. They could have or could have not accidentals (sharps/flats)
- There’re no doubles in one scale, like C and C#, or A# and Ab.
Knowing this you could now understand for exapmle why F-major has Bb but not A#. Because, if it has A# then it would consist of F,G,A,A,C,D,E (ignore accidentals for now). So, it don’t have B, and it has two A, which is no good.
The same stays true for any fancy scale like C# major. Since it’s C (ignore accidentals) it must consist of C,D,E,F,G,A,B. Now, all you have to do is to place accidentals to make it C#-major (whole-whole-half-whole-whole-whole-half). Which gives you C# D# E# F# G# A# B#… You may say “wait a minute?? what about this E#? Isn’t it an F actually?” Well, from the point of piano keys or guitar frets - yes. From the point of theory - no. Since if we choose F instead of E# then we would have C,D,F,F,G,A,B letters, which is no good ( double F, missing E).
You may try to experiment with another interesting scales, like F# double harmonic major. According to rules you know that it must be F,G,A,B,C,D,E sequence. Now we have to place accidentals considering the starting note (F#) and d.harm.major structure (half-3/2-half-whole-half-3/2-half).