So Ive never written a song before just poems but recently Ive wanted to just take the plunge and have a go at it.

My question is. Do you just write the song then think of chords or do you think of a tune then write to that?? Maybe something else entirely???

Any tips would be a huge help.

Thats the beauty - you do what you want.

There isn't an order. You do what you think is right, and find different methods of doing it yourself until you find your preferred one.
Writing Lyrics before Music is something a lot of people do, whereas an almost equal amount of people do the opposite. Its different for many, and if you find one more comfortable over the other, you're gonna do one first
My reccomendation is to write your lyrics/lyric ideas and keep them to a side for now. Then grab your guitar, and make up a riff or two, add the odd chord progression, and once your basic structures doen, you can start meshing it with your lyrics, to find them a melody.
I personally like to make up one or two riffs that sound good with each other, and focus the rest of the song mainly round power-chorded runs. Later on, i might make up other riffs to go over these, and this does help you pick up what riffs sound good, when they sound epic played over a rhythm track.
You can also go onto a system like guitar pro, and write up a riff, open a new track, put down drums, then open tracks for rhythm and bass and other instruemnts. i find taking a song a piece at a time, and writing the other isntruemnts with it gives you a better idea of how a whole song will sound, and tends to give you a confidence boost becasue remember, whilst guitar is one of the most awesome instruments, youd never in the life of you buy an album made up of only one guitar track. its boring.
Hope this helps, and good luck i still struggle myself with songwriting (only ever written one song im proud with, but when it happens, the feeling is immense)
Theres many different ways to write a song. Some structure the song first, with guitar chords, then add words, to a melody that fits the chords. Some like to compose the melody first, then structure the song around it.

Its all in the way that the idea takes you. If you think of a nice chord sequence first, try humming some melodies over the top, then swap the hums for words, then use the syllable count to make the lyrics more exciting/personal. This is how I like to write songs, because I feel more comfortable that way.

Likewise, if you come up with a melody, try swapping in some words, then find what key that its in, then use chords from that key to make a song, which is a method that I hear John Lennon used to use.

However, if you are used to writing poetry, like Micheal Stipe of REM, I would suggest reading your poems aloud to see what sort of a flow they have, and try to work them into a melody. If they don't seem to work (if it has an unnatural sounding flow, or too many/few syllables), just try working them into a useable line.

Next, try finding what key the melody of the vocals are in, and use either knowledge of theory, or trial and error to find some nice chords to fit behind the lyrics.

Good luck with the songwriting, hope this has been helpful
As everybody said so far, do it how you want! I've tried many different methods lately throughout the last year due to the fact I became the main songwriter for my 2 bands that just formed earlier this year. From personal experience, I find success in writing a lyric poem first then putting music behind it. But like I mentioned earlier, whatever floats your boat, so to speak.