The top state prosecutors have opened an investigation into TikTok, looking into its possible harmful effects on the mental health of young users.