Is there any certain way one should go about writing a song? Or is it pretty much just preference. I'm always hearing people say music to set the mood, but I can,'t do that.
Whichever you want. There are no rules
My Soundcloud
Always up for some C4C, been compared to Frank Turner, The Cure's Robert Smith and Bruce Springsteen so check out my stuff if you like the sound of that
Its always different for me. Sometimes music first, sometimes lyrics
Guitar Rig:
Fender Telecaster
Martin GPCPA5
Orange Rockerverb 50

Bass Rig:
Squier Vintage Modified Jazz V
Hartke HA3500
It is pretty much preference. The thing that's important is to keep the lyrics in mind when you write the song or vice-versa. You don't want to end up with lyrics that don't fit the song emotionally.
If you're playing music to get attention then you're forgetting the purpose of music
It doesn't matter where it starts, but it does matter that it makes sense when it's done.

When starting with the lyrics, one of the things that helps is having some stock chord progressions in mind to put under it. From there, the music can be molded to fit the lyrics or vice-versa.

I start with the basic four chord song: I-V-vi-IV progressions, like G-D-Em-C, D-A-Bm-G, C-G-Am-F, or E-B-C#m-A. From there I add and move chords to fit a good harmony with the melody of my lyrics.

And if I don't have a melody, I use the 3rds and 5ths of the chords to get inspiration. For instance, if you're on a C chord, try using E or G as the notes for the lyrics over those chords.
i've written both ways and it really just depends on what i'm trying to convey.
When i have an emotion or feeling to convey, i like to play around on the guitar for a while until i sink into something that really echoes the mood, and then start recording and write the song in real time, then go back and clean it up.

However, if the song is more of an idea, then i tend to sit down with a pen and paper and write it out like a poem, and then find some music to match it.
Musician talk, or techniques forum. This has been asked a million times before and are always closed. Repo'd
Music is an art form that celebrates potential. So long as you're looking for it, you'll always find it.