Yep, the reasons are the same as the ones seen on TikTok. They do it for likes and shares and fear is the driving factor. On YouTube they can also get income from ads and when watching one of those types of videos, the algorithms will suggest similar videos for you to watch. The keywords that are most profitable to drive traffic are "Spyware", "Hacking", "Compromised", and "Virus" to name a few, where the goal is to have their videos appear on the top of a search list with any of those terms. That is the world we live in on Social Media.
As stated, those codes have nothing to do with any setting or compromise on your device. Contact your cell provider for any questions. If your cell provider uses a Spam Blocker, call forwarding is enabled on your account as that is how those services work to check the number on a whitelist when using a third party. Tell your cell provider what you did and all the codes you typed as you may have made an unwanted change on your account that they can fix.