By Callum Keown and Kit Norton

Stocks rose on Monday with tech shares mostly bouncing back. The Nasdaq Composite index snapped its five-day losing streak. Wall Street seemed to take the easing of tensions in the Middle East as a green light to buy the dip.

In addition, the Supreme Court on Monday rejected President Donald Trump's attempt to remove Federal Reserve governor Lisa Cook.

Comcast stock gained 4.5%, paring back gains from a premarket jump of more than 20%. The cable and entertainment giant announced plans to split into two public companies through a spinoff of NBCUniversal and Sky.

Alphabet gained 4.8% on its first day of trading in the Dow Jones Industrial Average. The Google parent replaced Verizon Communications, which fell 5.2%.

SpaceX joined a new index--the Russell 1000--and the stock rose 7.2%. Shares of Elon Musk's rocket and AI company have fallen 24% since its closing high on June 16. SpaceX also joins the Nasdaq 100 on July 7.

Tesla added 8.5%. CEO Elon Musk posted to social media over the weekend that SpaceX's Grok 4.5 AI model was "perhaps" better than products from Anthropic. He added that the model was being used by Tesla.

Charter Communications gained 9.4%. The company and SpaceX have held talks about a consumer phone, according to Bloomberg. The Comcast spinoff also pushed the shares higher. AT&T fell 4% and T-Mobile declined 4.8%. SpaceX already offers direct-to-cell connectivity with T-Mobile in the U.S.

Rocket Lab added 16% after the rocket company announced an $8 billion acquisition that makes it more similar to SpaceX. Rocket Lab will acquire satellite company Iridium Communications for $54 a share in a cash-and-stock deal. The transaction would add Iridium's global satellite communications network to Rock Lab's rocket launch capabilities. Iridium stock advanced 25%.

Memory-chip maker Micron dropped 1.1%. Rival SK Hynix and Samsung pledged to spend more than $500 billion to build new chip-making hubs in South Korea. Applied Materials and Lam Research were up 11% and 8.4%, respectively. Both Applied and Lam supply equipment essential to the semiconductor manufacturing process. Intel declined 2.7%.

Palantir Technologies rose 2.5%. The software company announced a new strategic partnership with Nvidia to build secure custom AI models for the U.S government. Shares ended a seven-day losing streak on Friday and are set to continue rebounding following the Nvidia agreement.

Theravance Biopharma fell 3.2% to $17.06. Biotech company Zymeworks agreed to acquire Theravance for roughly $929 million, or $17 a share in cash. That price represents a 3.6% discount to Theravance stock's closing price of $17.63 from Friday.

QuidelOrtho soared 35% to $18.58. The diagnostics company is looking to sell its point-of-care testing business unit, valued at $1.5 billion, according to the Financial Times. The sale would help the company's lingering debt from a previous acquisition.

Martin Marietta Materials declined 5.7% after the construction materials giant announced it is acquiring limestone supplier Lhoist North America for $13.5 billion in a cash and shares. The acquisition would be the largest in Martin Marietta's history.

Write to Callum Keown at callum.keown@dowjones.com and Kit Norton at kit.norton@barrons.com

This content was created by Barron's, which is operated by Dow Jones & Co. Barron's is published independently from Dow Jones Newswires and The Wall Street Journal.