Hey all, please excuse another annoying post about songwriting tip help.

I'm a beginner at songwriting and have been playing electric guitar for almost a year now and am in the midst of writing a few songs.

The music I want to create is hard rock (mostly from the '80s, drawing out influences from Kiss, Motley Crue, Alice Cooper, Twisted Sister, etc).

My question is, what do you all think is the best way to write these songs? Right now I'm creating the entire guitar part of the song and trying to fit lyrics in, but do you think it should be the other way around?

I appreciate all the feedback I can get.
i usually noodle on my guitar and then ill stumble across a riff or chord pattern that i think has potential. Then i usually play it and just sing over it to get a start on getting a melody. once you have your melody set lyrics usually flow out of you.

If you have trouble writing lyrics/writers block, i usually find a song i like and ill rewrite a verse of it with my own lyrics. That helps me get back into a creative flow.

also dont be too hard on yourself, its easy to think your song sounds too generic or boring but most of the time thats just cause we doubt our abilities.

Good Luck!
I have written both ways, and I still do. However, I find that there is a lot less pressure when writing the music first.
This is because when I write the lyrics first I then have to ensure that the rhythm of all instruments fits every single line. I don't want to have a crucial word spoiled as it is drowned out by a cymbal or snare drum at that exact time, or the tone a line is sung in becomes muddled with a matching bass tone or a piano or guitar rhythm doesn't flow with the rhythm of a particular line. I also would not want each line to have a different structure just to ensure all words are heard clearly.
I find that coming up with a riff first helps as I then can sing lines over a looped recording and they flow on better in the correct rhythm. Just like when I listen to a song and sing my own extension after it's finished (or is that just me?).
That being said, I do view the vocals as an instrument too. There's no need to write an entire song on guitar, then write the full bass line, then the full drum track all at once and then the full lyrics. You can write a chorus around the vocals then create an instrumental verse then write the lyrics to accompany that.
I just find that the pressure is far less if I commence with the music and then the sentences and themes seem to flow on from each other. I also don't get hit with the disappointment of changing the lyrics from what my heart was originally set on just because it didn't gel with the music. If there's nothing to change them there's no regret later.