You have a copyright in your work from the moment you fix it intangible form. For a song, once you write it down or make an audio or video recording of it you have a copyright in the song. Registration is not required to obtain a copyright, but you do need to register it before you may enforce your rights in the work. You don't give up all your rights in the work by uploading it to YouTube. See a copyright lawyer for help in enforcing your rights against people using your song without your consent.