Are you asking how to write lyrics before you have music?
To do that, you have to set a rhythm to follow. (That's called a 'meter'). A rhyme scheme helps too. Then you write using a song structure like Verse, Chorus, Verse, Chorus or whatever. It's not the easiest way to begin writing songs. You have to be aware of what 'standard' song structures are. But once you know that, you can make some good progress. It's all about form.
An alternate way is to write new lyrics to existing songs. That gives you a good structure to start with and you can then add a new melody to your new lyrics, thus getting a new song.