The key in your question is: "How to remember". I paraphrase it as: how to make the scale degrees memorable.
From the subjective experience of one person, I deduce the following universal rule: you need to associate each degree of the major scale with emotional and functional meanings. And this is done by playing strong melodies and their accompanying chords, by ear, in different keys. When you know the relative "topology" of the scale, then the task of playing in different keys becomes a question of superimposing the scale you already know on top of whatever position you want to play in.
The major scale is enough, because when you get going with it, other scales are trivial to see as alterations or modifications of the major scale. You really do not need to learn e.g. "melodic minor" and "harmonic minor" separately, if you know songs with melody lines and chords that use those notes.
It might be difficult to remember the faces of random people, but once something memorable happens with a person, you'll remember. Which face belongs to the boy who punched you in kindergarten? Who was the one you asked out but who refused? Who was the one who asked you? So, get into memorable action with the notes - or actually, with their roles.
This is how I learned it. At the age of something like 4-6, probably like many people, I learned to locate the C note on the piano, and I learned to play a few simple melodies that other children showed, simply as memorized sequences of notes. The melodies were all in C major, i.e. white keys only. I think I even knew the names of the notes, but apart from the C note, which was important to remember because that's where all the songs started from, none of the notes had any particular meaning to me. The keys were just a homogeneous porridge, with the black keys being especially mysterious, maybe even scary, because playing any of them usually just felt like a mistake.
Then at some point, I had a big "revelation". I heard and saw an older child play something like this: (Of course I knew nothing about notation, I'm only writing things from memory)
It sounded really nice, and I had heard something nice like that before, but this time I saw what she did! I waited until everyone had left, sneaked back to the piano, and tried to replicate what I had seen. I couldn't remember the exact arpeggio pattern, but I remembered the note locations, with the bass notes and everything, so I just tried pressing all the keys down... BOOOM! It was one of the most intense experiences of my whole life - hearing that beautiful harmony come from the piano, and incredibly, even being in control of it. There was C major, A minor, F major, G major, but each one of them felt so different and so strong in its own way. Pretty much immediately I started to try and explore other similar patterns - what happens if I move this to start from D? Oh, nice! Etc. I started to play songs by ear, finding suitable three-note chords, and I realized that none of this is tied to the absolute location at all. My father accompanied songs on the guitar, and I was used to hearing him say things to someone else like, "let's do this song in C minor ... oh, that's a bit too low, let's try D minor then", so it was kind of a given that not only can songs and chords be moved up and down, it's what you have to do all the time. My father didn't know almost any theory, just how to play songs in folk style, and tricks you do in melodic songs like "in Am, you can put a B major in front of E major, ha ha". So the whole music thing was basically a big playground for fun and exploration. The lyrics might sometimes have been serious, but the music was a toy to play with.
Anyway. In chords, or chord roles, I now had very strong and important, meaningful elements that felt like they're the elemental building blocks of all beautiful music. I associated in my mind, the scale's notes with their various roles in harmony.
For example, E, it wasn't just another note in the porridge anymore.
- E was the base note of E major - my dear E major - that so beautifully worked with D minor and A minor in so many songs I loved.
- And E was C major's middle note, the very thing that makes C major a major instead of minor, i.e. the "third". (Which was and still is, in my opinion, the most important thing to know and keep track of when playing - where's the third of the imaginary chord you're playing - sometimes even the root note can be changed)
- E was the other bass note for a switching bass pattern in Am, where you go like /A /E /A /E.
- E was the starting note of "Für Elise", the beautiful common melody that goes to Am.
- E was the funny but interestingly bland note in the "G6" chord, which I found in some chord chart.
- E was the jazzy note in Fmaj7, which I also found somewhere.
Similarly for all other notes, every one of them became familiar in many roles. Many strong and memorable things happened at every position.
A song isn't really tied to any key, you can move it anywhere else. The note names and positions on the piano keyboard change, but the roles and their relative positions stay the same. You could - and should - play everything in different keys. (For years I felt a bit inadequate, because there was always some new chord trick I couldn't yet fluently play in, say, E major or B major. Still today I don't consider really knowing a chord trick, if I can't play it in B major just as easily as in C major.)
To translate the above list of functional associations to relative scale degrees (as opposed to absolute notes), it would be like this:
- 3 was the base note of III major - my dear III major - that so beautifully worked with ii minor and vi minor in so many songs I loved. ("I" as in the English first-person singular pronoun referring to one's self, not the Roman numeral "one")
- 3 was I major's middle note, the very thing that makes I major a major instead of minor, i.e. the "third". (I didn't really do a lot of inversions until I combined playing both melody and chords with the right hand)
- 3 was the other bass note for a switching bass pattern in vi minor.
- 3 was the funny but interestingly bland note in the V6 chord.
- 3 was the jazzy note in IVmaj7.
I could tell many other things like how I discovered diminished chords and their interesting properties, tritone substitutions and such stuff but I think you get the point already.
To sum up my life-story above: I recommend playing old-fashioned songs, with strong melodies, and accompanying the melodies with chords. Play the songs in different keys to separate the relative pitches from the absolute pitches. You'll learn actual memorable meanings for each note of the scale this way.