The TikTok ban took another step toward becoming a reality on Tuesday as the Senate pushed a foreign aid package forward. The package includes a stipulation that could ban TikTok if ByteDance, its Chinese owner, doesn't divest it in a year. The House has already passed the bill, and President Biden signed it on Wednesday.

TikTok has been a lightning rod for controversy among legislators amid a tech cold war with China that has led the U.S. to block exports of advanced semiconductors and semiconductor equipment to China.

Some lawmakers believe that TikTok is sharing user data with Beijing and that it can be used as a vehicle for Chinese propaganda, though ByteDance has denied those allegations.

The implications of a TikTok ban or divestiture are vast, as the social media app has more than a billion users around the world and thousands of American businesses and influencers rely on TikTok to generate income. The regulatory pushback also has implications in the stock market as rival social media stocks have bounced in response to the likelihood of a ban passing Congress.

Two Magnificent Seven stocks that look poised to benefit from a TikTok ban are Meta Platforms (META 0.16%) and Alphabet (GOOG -0.75%) (GOOGL -0.77%). Let's take a look at what each stock has to gain from a potential TikTok ban.

A person on their phone in front of a computer.

Image source: Getty Images.

1. Meta Platforms

Arguably, no company benefits more from a TikTok ban than Meta Platforms. It is the parent company of Facebook, Instagram, and WhatsApp, and the world's biggest social media company. The rise of TikTok dealt a significant blow to Meta, taking eyeballs away from Facebook and Instagram, and denting Meta's user and advertising growth.

It's impossible to quantify the impact of TikTok on Meta's business, but it was palpable in recent years. Meta responded by launching a competing product, Reels, which after years of ramping up is now positively contributing to Meta's profits.

Still, TikTok likely remains Meta's biggest challenger. TikTok has more than 1 billion worldwide monthly active users, making it the world's biggest social media platform after Facebook and Instagram. In the U.S., TikTok has an estimated 102 million users.

Presumably, those users would be up for grabs if TikTok were banned or significantly limited, though it's unclear if they would switch to a Meta property like Facebook and Instagram. There is a significant overlap between the user groups, too. However, the lack of competition in the U.S. market for both users and advertisers would almost certainly benefit Meta just as the rise of TikTok has challenged it and pressured growth.

2. Alphabet

Alphabet's primary business, search advertising, doesn't compete with TikTok, but one of its biggest cash cows, YouTube, does.

YouTube may not be a social media platform in the classic sense. It functions as something of a hybrid between a social media app like TikTok and a streaming service like Netflix. But people use TikTok primarily to watch videos covering a wide range of content, rather than connecting with friends.

However, YouTube's similarities to TikTok are still clear, and many creators post content on both YouTube and TikTok.

Much as Meta has adapted to the threat from TikTok by launching Reels, YouTube made a similar move by introducing YouTube Shorts, a sign that the company sees TikTok as a competitor.

YouTube's growth has been less visibly impacted by TikTok than Meta's has, but it's likely to benefit similarly from a TikTok ban as ad spending on TikTok would be up for grabs as would audiences.

Should you buy Meta and Alphabet on a TikTok ban?

Whatever happens with the legislation working its way through Congress, social media investors should understand that even if the legislation passes, a ban could be tied up in court for years. Banning a company the size of TikTok is extraordinarily rare in the U.S. The closest thing in recent memory may be the piece-by-piece dismantling of Juul, the company known for flavored vapes. Juul was ordered to remove its products from the U.S. market in 2022 by the Food and Drug Administration (FDA), but they are still widely available two years later.

A TikTok divestiture into American hands is also a distinct possibility, probably with a faster resolution. Business sales are more common and usually smoother affairs than government sanctions.

Either way, it will likely be years before government restrictions have a meaningful impact on TikTok's operations. Still, social media investors should be paying attention to the issue as even a high-profile court case would be costly to TikTok and could damage its reputation.