Hey @Music_is_my_dream, thank you for posting! You've come to the right place if you really love music and want to get into writing! :)
While you don't really need to play any instruments to start writing music, it really helps if you know what the notes are on a piano and can read sheet music. If you don't already know how to do that, I'd recommend starting there! It's much easier to write music if you can work it out on the piano rather than in your head.
Songs themselves almost always have both melody and harmony. While melodies can be easily written without any training, harmony requires you to know music theory. You can learn everything you need to know about music theory online, but a good book (and my personal resource) for beginning music theory is Elementary Harmony 5th Edition by Robert W. Ottman. It'll tell you everything you need to know about chords to write your song. It also helps you learn how to read sheet music.
Best of luck, and welcome to YC! :)