Ofcom has launched an investigation into whether TikTok is failing to protect children from harmful content.