As soon as the music/lyrics are created the Copyright exists and the author controls and owns the copyright.
People used to record a song and post it to themselves on a cassette tape so that they could use that as evidence that they wrote the song around the date of the postmark should they need to.
Today a dated digital file of your demo recording on your computer you could be used as evidence - so if anyone else did copy your lyrics or music you could prove by showing that dated file that you have written it prior to them.
For any copyright infringement you would also have to show that somebody has access to your song or recording I.e. that they copied you. . So it is possible that somebody else could write a song with the similar or the same lyrics or melody as your song. but if they did not hear your song they would have created it independently of you. Just because your lyric/melody may have pre-dated theirs doesn't mean that you that they copied you. Without having heard your song their song would not infringe your copyright even if it was the same.