In 1990, about 30,000 Russians braved the January frost to line up in Moscow’s Pushkin Square. The payoff for the hourslong wait was the first taste of burgers and fries from the country’s inaugural McDonald’s restaurant.

In the years that followed, Western businesses flocked to Russia, seeking to profit from the country’s lurch from communism to capitalism. They introduced American fast food, cars and fashion to a generation accustomed to Soviet-era shortages, and in many cases built sizable businesses. Starbucks, iPhones and IKEA became a part of daily life for middle-class Russians in Moscow and St. Petersburg.

Russia’s invasion of Ukraine has brought that symbiotic relationship to a crashing halt.

Blistering sanctions and pressure from the U.S. and allied governments have made doing business in Russia almost impossible for many Western companies. Hundreds of businesses, including McDonald’s Corp., auto makers, oil giants and banks, have said they are pausing or ending operations there. Western restaurants and stores have gone dark.

In response, Russian authorities have raised the idea of nationalizing assets Western companies leave behind. The Wall Street Journal reported this week that Russian prosecutors have issued warnings to Western companies inside the country and threatened to arrest corporate leaders there who criticize the government or seize assets of companies that withdraw.

Alexander Isavnin said the exit of Western businesses is like going “back to the Stone Age.” The 45-year-old has been having flashbacks to his Soviet Union childhood when he and friends stitched patches with the Levi Strauss & Co. logo onto other pants to look cool.

“I remember the dark times before the West came here,” said Mr. Isavnin, a Moscow-based university lecturer and member of the Pirate Party of Russia, a small opposition group.

In case of unrest or war with the West, his recent spending has gone toward nonperishables. “I was planning to buy new bed linen from IKEA and upgrade my Mac,” he said. “Instead I have a lot of canned meat and sugar.”

Among those speaking out against Western companies is a local deputy from the Yaroslavl region, northeast of Moscow, who called for nationalizing McDonald’s restaurants. He is promoting Russian alternatives to Coca-Cola, such as kvass, a fermented grain-based drink that might contain a trace amount of alcohol, and tarkhuna, a greenish, tarragon-flavored carbonated beverage.