The Supreme Court upheld a law banning TikTok in the United States on national security grounds if its Chinese parent company ByteDance does not sell it.