https://en.wikipedia.org/wiki/Berne_Convention
> Under the Convention, copyrights for creative works are automatically in force upon their creation without being asserted or declared. An author need not "register" or "apply for" a copyright in countries adhering to the Convention. As soon as a work is "fixed", that is, written or recorded on some physical medium, its author is automatically entitled to all copyrights in the work and to any derivative works, unless and until the author explicitly disclaims them or until the copyright expires.
For the US, see https://www.copyright.gov/help/faq/faq-general.html#mywork :
> Your work is under copyright protection the moment it is created and fixed in a tangible form that it is perceptible either directly or with the aid of a machine or device.
> ... In general, registration is voluntary. Copyright exists from the moment the work is created. You will have to register, however, if you wish to bring a lawsuit for infringement of a U.S. work. See Circular 1, Copyright Basics, section “Copyright Registration.”
That "Copyright Basics" links to https://www.copyright.gov/circs/circ01.pdf :
> Applying a copyright notice to a work has not been required since March 1, 1989, but may still provide practical and legal benefits. Notice typically consists of the copyright symbol or the word “Copyright,” the name of the copyright owner, and the year of first publication. Placing a copyright notice on a work is not a substitute for registration.