You don’t make music out of theory, you make theory out of music!
It is a good idea to just be creative and work off of inspiration when writing music for a song. Try to be creative and think outside of the box. Music theory is a good thing to know when you are writing the music for a song and you get stuck. If you know your theory, you can get ideas from it to help your writing process and think of what to do in the part where you are stuck.