Upon conducting research on multiple occasions, I have found that purchasing YouTube channels is generally considered legal. However, it is worth noting that in certain cases, such transactions may violate the platform's terms of service, as others have mentioned.
For personal accounts, transferring ownership is always against the terms of service. However, for brand accounts registered under a business name, it is possible to transfer ownership since it is regarded as a business asset. Google distances itself from any responsibility or involvement in such transactions, especially with personal accounts. This is because personal accounts are tied to specific sign-up details, and changing those details may lead to complications such as the account being claimed as "hacked" by an unscrupulous buyer. YouTube prefers to avoid dealing with such potential issues. On the other hand, for brand accounts, the ownership can be easily proven since the account is registered under the company's name.
It's important to note that the information I provided may be outdated, as it has been a considerable amount of time since I last looked into this topic. In the case of MrBeast, it is highly likely that he operates a brand account registered under a legally recognized business entity. Therefore, attempting to purchase his channel would be akin to making an offer to buy the entire business.