The legality of uploading a video game soundtrack, such as Super Mario's theme, to YouTube is a complex issue that depends on various factors, including the copyright laws of the country in question, the specific terms of the video game's licensing agreement, and the nature of the use of the soundtrack.
In general, video game soundtracks are protected by copyright law, which gives the copyright owner exclusive rights to control the use and distribution of their creative works. This means that uploading a video game soundtrack to YouTube without the permission of the copyright owner could be considered copyright infringement.
However, the situation may be different if the use of the soundtrack is considered to be "fair use." Fair use is a doctrine in U.S. copyright law that allows for the use of copyrighted material without permission in certain circumstances, such as for the purpose of criticism, commentary, news reporting, teaching, scholarship, or research. Whether a particular use of a video game soundtrack constitutes fair use is determined on a case-by-case basis and depends on factors such as the nature of the use, the amount and substantiality of the portion used, and the effect of the use on the market for the original work.
In some cases, video game developers and publishers may allow for the use of their soundtracks in certain circumstances through licensing agreements. For example, some video game soundtracks may be licensed for use in YouTube videos under the terms of the YouTube Audio Library.
Ultimately, the decision of whether or not to upload a video game soundtrack to YouTube should be made after careful consideration of the relevant copyright laws and licensing agreements, and with the assistance of legal counsel if necessary.
Source: United States Copyright Office, "Fair Use" (https://www.copyright.gov/fair-use/).