Umm ....
Well no one can really tell you how to write a song. Sure there are basic formulas: verse-chorus-verse-chorus-bridge-chorus, etc.
But you just have to kind of do it.
Some ideas for getting song topics would be:
personal experience
reading the newspaper
watching a movie with the sound off and writing a song to it
things like that ...
As far as recording goes ...
most people start with the rhythm tracks (like drums, bass, rhythm guitar, etc.) then add fill parts (keys and guitars), and then record the vocals last. Some people like to record a scratch (throwaway) vocal at the beginning just to help the vibe or to help keep place in the song.
You asked about two HUGE topics: songwriting and recording. I'm afraid neither of them can be summed up in a nutshell. They probably couldn't be summed up in 1,000,000 nutshells.