India is absolutely right in banning TikTok as it is a significant national securities threat. As long as the platforms recommendation and ranking algos are a black box, there is no guarantee that China isn’t conducting misinformation campaigns via the platform. At the very least, the government should audit the algos and make sure China can’t arbitrarily alter ranking results.
Are YouTube algorithms open? I don't really see a difference here. Nation state vs. private corporation is different on paper, but I don't see why. They're both going to react to material stimuli to increase their standings.
A nation state and a company are different in substance as well. I am sympathetic to the idea that companies (in America) can do more to curtail your freedoms. But, this is only true because of our system of government. In principle, a government can do much more than a company to curtail your freedoms. In practice, this is often less true. (although if you bump into eminent domain, or similar laws, then the government is much more threatening to you.)
We don't have to look far for this theoretical: the Chinese government rounds up people and puts them in camps, and disappears people for having the wrong opinions.