ByteDance, the parent company of the popular social-media platform TikTok, has a not-so-secret weapon. Its powerful algorithms are able to predict users’ preferences with precision and recommend content they actually want to see, thereby keeping them glued to their screens.

But ByteDance may soon have to sheathe that weapon — or, at least, dull its blade.

Internet-platform companies in China are facing a slew of new data regulations that could curtail the use of recommendation engines. For starters, the Personal Information Protection Law, which took effect this month, requires platforms to allow users to opt out of personalized content and targeted ads.