The US Supreme Court has backed legislation requiring TikTok’s sale by ByteDance or a nationwide ban will take effect.