Learning vocal music is mainly about learning how to sing, and learning guitar is about learning how to play the guitar. They are both auxiliary and helpful for composing songs, but they are not the most important. If you really want to learn to compose, you must learn the basics of music. Start by learning music theory, sight-singing and ear training, then polyphony, harmony, then musical form analysis and creation, as well as specialized composition subjects. It’s not easy to learn. . . But depending on what you mean, you should be a music lover and more interested in pop music. If you want to learn composition, I suggest you follow a teacher and learn simple composition quickly. Generally speaking, it consists of four courses: music theory, sight-singing and ear training, piano, and musical form structure analysis. If you are writing something fun by yourself, all you need to do is know simple musical notation and an instrument (guitar or piano).