OSAKA, Japan— Donald Trump said recently that only stupid people think an extra-strong currency means a strong nation.

Whatever one’s view of the former president, his comment pointed to the tricky politics and psychology of gyrating currencies. Take Japan, where a  historically weak yen  is helping Japanese manufacturers get stronger—the part that irked Trump—but is also wounding the nation’s self-image and widening a perceived prosperity gap with the U.S.

Andrew Wong, a 38-year-old tourist visiting Japan from Singapore, recently enjoyed the finest cut of Kobe beef, grilled for him in front of his eyes by a chef. The dinner cost the equivalent of about $175, and Wong said it was worth the splurge.

Just a few blocks away, at a restaurant operated by the same company, Tsutomu Matsubara, a Japanese educator in his 60s, was dining on a lesser grade of beef at a lower price. He said he would never go to the pricier restaurant.

“That’s for foreigners,” Matsubara said. “It would still be cheap for them because of the weak yen.”

As recently as early 2022, a dollar bought around 115 yen. Today, even after apparent  market intervention by Japan’s government to prop up its currency, the dollar buys about 155 yen, the most since 1990.

Japan is becoming two nations: In a few enclaves, foreigners wielding dollars and euros live the high life, while in most of the country, locals who hold only the weak domestic currency make do with less.

Tokyo’s luxury shopping district of Ginza and the Niseko ski area in the north have become playgrounds for wealthier visitors from abroad, with Japanese people there mostly in lower-paying jobs to serve and clean up after them.

That description makes Japan sound like a developing nation—a status it left behind in the 1960s when it became the world’s second-largest economy behind the U.S. Now it is No. 4, trailing the U.S., China and Germany.

Dai-ichi Life Research Institute economist Hideo Kumano said Japan could soon fall to No. 6, overtaken by India and the U.K. “We must not forget that the trend of Japan’s decline is still continuing,” Kumano said.

The weak yen raises the price of imported food and fuel, which has hurt consumer spending and contributed to a contraction in Japan’s economy in the first quarter of this year.

Hiroyuki Sasai, manager of a rickshaw business in the city of Kyoto, said he was doing fine himself but worried about his country. “If the value of the yen represents the value of Japan, it’s just too low,” he said.

Sasai said more foreigners were willing to splurge on a full-hour rickshaw ride for two, which costs the equivalent of $130.

On a recent afternoon, one of his drivers clenched his teeth pulling a rickshaw, which alone weighs about 176 pounds, as well as two visitors perched inside.

Noriyuki Maeda, a Japanese tourist, watched the scene uneasily. “It looks like hard work,” Maeda said. “But it cannot be helped, because Japan won’t be prosperous without foreign visitors.”

Not far away, Kyoto street singer Masaharu Matsuo, 67, took the long view. “Don’t you know how poor Japan was before the war? There is no one dying of starvation now,” he said. Matsuo, though, said that those who tipped him generously were always foreigners.

In April, Japan received more than three million visitors, nearly matching a monthly record set in March. Visitors spent the equivalent of some $11 billion in the first quarter of the year, setting a record in yen terms though not in dollars.

The cheap yen is also good for exporters such as Toyota Motor , which just reported its most profitable year on record. Toyota is racking up sales of hybrid cars in the U.S. , where people pay in dollars, while manufacturing many vehicles in Japan where workers earn less-valuable yen. Japanese stock prices are near a record high.

Trump recently said on Truth Social that the dollar’s rise versus the yen was “a total disaster for the United States.” A strong dollar, he said, “sounds good to stupid people, but it is a disaster for our manufacturers.”

President Biden said in April that the U.S. has “the best economy in the world,” and he has previously suggested that a strong dollar reflects healthy U.S. growth compared with other countries.

Japanese merchants know who has the spending power these days. At Osaka’s 200-year-old Kuromon Market, a seller called out, “Sushi, sashimi,” while another shouted, “Cheap, cheap!” in English. At $2.60 for a can of Coke and $6.50 for eight octopus balls, a local specialty, the prices hardly seemed cheap for locals.

Rino Sumitomo, who runs the octopus-ball stand, said she started the business in March and it has been going well. “People say we’re ripping off customers,” Sumitomo said. “But I don’t think it’s too expensive for inbound tourists.”

Still, Sumitomo, a 40-year-old mother of two, said the weak yen made her worried about the future of Japan. She said she wanted her children to learn English and planned to take them to a summer camp this year in Australia. She wants to move there someday and has urged her husband to train as a sushi chef so he can get work abroad.

Japan Research Institute economist Shinichi Nishioka said the yen’s weakness was hurting workers’ real wages because they have to pay more for imported goods such as fuel. But he expressed optimism that the situation would be self-correcting.

“If Japanese businesses can take advantage of the yen’s weakness and make more sales to foreigners, the yen will naturally turn stronger,” Nishioka said.

Outside the Kobe beef steakhouse in Osaka, tourists lined up for cubes of barbecued high-grade Wagyu beef on a stick. Wagyu refers to beef from select breeds of cattle native to Japan, with Kobe beef a particularly prized kind of Wagyu.

“It was only $35,” said Junell Barron, 24, an American in Japan on a monthlong military deployment, as he polished off the last piece. “This is a great deal!”

Chefs at the restaurant can hardly afford Kobe beef themselves.

“I often go to McDonald ’s or Sukiya after work at night,” said Katsushi Onoue, one of the chefs, referring to a cheap beef-bowl chain.

Write to Miho Inada at miho.inada@wsj.com