By Joe Wallace and Alexander Osipovich

Major U.S. stock indexes edged slightly higher Tuesday, though weakness in the shares of technology and social-media companies capped their gains.

The Dow Jones Industrial Average rose 60.00 points, or 0.2%, to close at 31068.69, after wobbling between small gains and losses throughout the day.

The broad-based S&P 500 ticked up 1.58 points, or less than 0.1%, to 3801.19. The Nasdaq Composite advanced 36.00 points, or 0.3%, to 13072.43.

All three indexes closed at record highs on Friday but retreated at the start of this week.

Investors broadly expect stocks to rally this year as the rollout of vaccines and fresh government spending help the economy recover from the disruption caused by the pandemic. Still, some are bracing for volatility in the coming months amid risks stemming from high valuations in parts of the market, elevated coronavirus case rates and political uncertainty following last week's attack on the Capitol.

In the coming days, money managers will parse quarterly results as earnings season gets under way among U.S. companies. Companies set to report results this week include Delta Air Lines and JPMorgan Chase.

"There is an expectation for an earnings recovery compared with last year, which is quite important," said Maria Municchi, multiasset portfolio manager at M&G Investments. "The stimulus we have seen is certainly supportive to some of this earnings growth."

In Washington, Congress careened toward a fresh showdown with President Trump. House Democrats said they plan to vote on impeaching him Wednesday over accusations he incited supporters to storm the Capitol.

The clash could lead to some short-term swings in stock prices but ultimately has limited implications for investors, according to Ms. Municchi. "Compared to the pandemic situation and the need for resolution, this is almost a side show," she said.

Some big technology and communications stocks continued to decline after sharp drops on Monday. Facebook fell $5.75, or 2.2%, to $251.09, while Twitter slid $1.14, or 2.4%, to $47.04. The two social-media companies have taken increasingly tougher actions to block Mr. Trump's accounts and stem misinformation and incitements to violence ahead of President-elect Joe Biden's inauguration.

Shares of Google parent Alphabet declined $18.86, or 1.1%, to $1737.43, while Apple slipped 18 cents, or 0.1%, to $128.80. Both tech giants recently removed Parler, a social-media service popular among conservatives, from their app marketplaces amid concerns that it was being used to promote violence.

Such actions have raised jitters that Big Tech could face new regulation, particularly with Democrats set to take a narrow majority in the Senate, said Olivier Sarfati, head of equities at GenTrust. "They are a lot more at risk after the Capitol Hill riot than prior," he said.

Six of the S&P 500's 11 sectors, including energy and financials, ended Tuesday in positive territory. Technology and communications were among the sectors that declined.

In other corporate news, Tesla shares jumped $38.25, or 4.7%, to $849.44 after local media reports said the electric-car maker is in talks to join with Tata Motors to build out its business in India.

General Motors shares surged $2.81, or 6.2%, to a record high of $47.82 after the auto maker said it was launching a new electric-truck business geared toward delivery services.

Albertsons rose 35 cents, or 2.1%, to $17.10 after the grocery chain reported sales that beat projections.

The yield on 10-year Treasury notes climbed for the seventh consecutive trading session, rising to 1.136% from 1.131% Monday. Expectations of higher government spending and more bond sales have driven a selloff in U.S. government bonds. The advancing yields could pose another threat to tech stocks and other assets that have benefited from low interest rates. Yields move in the opposite direction of bond prices.

A Treasury Department auction for $38 billion of 10-year notes met strong demand from investors on Tuesday, a day after the Treasury sold a record $58 billion in three-year notes.

Oil extended its recent rally, which has been driven by a global recovery in fuel demand and continuing production cuts by the Organization of the Petroleum Exporting Countries. Futures on Brent crude, the benchmark in international energy markets, rose 1.7% to settle at $55.66 a barrel.

Overseas, the Stoxx Europe 600 index rose less than 0.1%. Most major Asian equity benchmarks ended the day higher. The Shanghai Composite gained 2.2%, while Hong Kong's Hang Seng advanced 1.3%.

Write to Joe Wallace at Joe.Wallace@wsj.com and Alexander Osipovich at alexander.osipovich@dowjones.com

(END) Dow Jones Newswires

01-12-21 1702ET