If I want to learn about melodic for composition, I have to learn counterpoint, that 's right? Or it has other ways or great books for learning about, please anyone help me I lost a lot of time for finding specific knowledge. Thank you in advance for saving my time.
The way I understand the question is this: Do I need to learn counterpoint to write melodies or music in general?
The quick answer is: No, you do not need to learn counterpoint to write melodies or music in general. Counterpoint (in its strict sense) is a specific set of rules for writing one or several melodies together. The reason you would want to learn counterpoint is to sharpen your ability to write melodic lines that can both combine to make a harmonic structure while at the same time being independent and following a strict set of rules that govern their movement.
If you want to learn to write good melodies, you should spend time writing and internalizing melodies you enjoy. If you want to write good chord progressions, spend time learning and internalizing chord progressions you like, etc etc. Find music you really enjoy and pick out the parts you like. Start building a "vocabulary" of melodies, chord progressions, rhythms, or textures that you like, and try to write them out or reverse engineer them. If you are serious about writing, learning how to read and write music is important. This will also make it easier to catalogue what you come up with or when you find something you like. You might want to find a teacher of some sort to check your work and offer advice as you go, as writing "good" music is sometimes not as obvious as writing "good" literature. I would say only go for something like counterpoint if you feel you really are compelled to learn it. Most average people out there just write what they think sounds "good" or "cool." If you spend time with what you think sounds "good" or "cool" and figure it out on your own, you'll be off to a good start. And when in doubt, find a mentor or teacher!