音楽 and 歌: music broadly and songs
Distinguish the music category from songs performed with the voice.
Listening to or performing music
音楽 (おんがく) means music. 「音楽を聞きながら休みました」 means resting while listening to music.
「楽器だけの音楽が流れています」 describes instrumental music playing. Music does not necessarily have lyrics.
Singing a song
歌 (うた) means song. 「みんなで歌を歌いました」 says everyone sang together.
「この歌の歌詞を覚えました」 says the lyrics of this song were memorized. It does not establish that the song was performed.
Category versus activity
Songs can be part of music, so 音楽 and 歌 are not exclusive categories. They relate a broad category to a particular form.
「歌は好きですが、人前で歌うのは苦手です」 says the speaker likes songs but struggles to sing in front of others. Separate preference from performance ability.
Must music have lyrics?
Show the answer and why
No. Music can be performed by instruments alone.

