As for the staff, major minor belongs to music theory. You can go to TB or bookstore to find books on music theory. There is a new edition of music theory by Shanghai Music Publishing House, which is very authoritative. At present, most guitars use staff, so staff needs to be mastered skillfully. Once you have learned it thoroughly and combined with a certain musical instrument foundation, you can start writing.
There are many categories of music creation, such as pop songs, art songs, operas and folk music creation. Although there are many classifications, the starting point is the same, that is, starting from analysis. Here, I suggest buying a set of Bartok's Little Universe (Piano Staff), which contains almost all the necessary points of writing, including death, cannon, out of tune, tone sandhi and so on. Slowly hone your writing skills from the analysis of the small universe.
Secondly, harmony is very important. The application of harmony runs through the whole process of music creation, including melody writing, accompaniment and arrangement. Recommended "Harmony Acoustics Course" by Sposobin and "Writing Pop Songs: Harmony" by Jimmy Kakuris. Harmony is a very difficult part compared with musicology. You can lay the foundation for your creation by learning the rules and sound effects of harmony. Sometimes it is not difficult to write a melody, but you will be at a loss to accompany it, which is why harmony is not used.
In addition, music is, in the final analysis, a science with ears. By listening to a lot of music, including pop, art and even symphonies, and writing down the harmonic progression, structure or melody you are interested in while listening, you can expand your own harmony library and melody line library, which is also based on music theory and harmony.
Finally, inspiration is of course an indispensable part. Different scenes and moods can trigger different inspirations. It is a good choice to dabble in the literature and tourist scenery of various countries and enrich the sources of inspiration.