What if you had an idea for a song and couldn't remember it later?

I would highly recomend getting a voice recording app. Apple should come with a default app called "Voice Memos". If you don't have an apple phone, get some voice recording app that is available to you. Whenever you get a melody idea, or a drum beat idea, or chord progression idea, just hum or whistle it into a voice recording. When you start your song writing session later, open your app and listen to the recording. I started doing this a couple months ago, and it really has helped me stay organized with my ideas. Also have a notepad app. If you get a lyric idea while you are away from home, just type it on your notepad app. There are some specialized apps that are designed specifically for lyric ideas and melodies. Find one that works for you. There are plenty of free options. I personally don't sing or write lyrics, but you might want one if that is what you do.