Japan will take some steps to show disapproval of the Soviet invasion of Afghanistan, Japanese officials said today, but they acknowledged having trouble deciding just what it would be.

The government is considering a number of steps but the emphasis is on caution. One reason is that Japan does not want to deeply anger its powerful neighbor and another is that some proposed measures might end up hurting Japan economically more than it would the Soviet Union.

After a lengthy Cabinet meeting that discussed several alternatives, a government spokesman quoted Prime Minister Masayoshi Ohira as saying that Japan must deal with the situation in Afghanistan "with caution."

By the end of the day, the ministers apparently had agreed only on one mild gesture of disapproval. That one would call upon the Japanese parliament to postpone the scheduled visit here later this month of members of its Russian counterpart, the Supreme Soviet.

In public statements here and at the United Nations, Japan has strongly condemned the invasion. It has announced it would refuse to recognize the new Soviet-installed government in Kabul and is continuing its cut-off of economic aid to Afghanistan, which was instituted last fall because of instability in that country.

Government officials said today they realize a need for measures that would demonstrate Japan's displeasure directly to Moscow. American officials denied they were asking Japan to take such measures, insisting that any steps taken would be only at Japan's initiative.

Successive conservative Japanese governments have tried to strengthen relations with the Soviet Union, and there is reluctance within the Ohira administration to take any steps that would seriously undermine the relationship.

Japan is also conscious of a large buildup of Soviet troops and facilities on the Kurile Islands. The islands were taken over by the Soviets at the end of World War II but are still claimed by the Japanese.

Both of these considerations are said to figure in the cautious approach being followed by the government.

The government is reported to be considering a number of possible economic measures that might inflict some punishment on the Soviets, but it appeared any of them might take some time to be put into effect. One Japanese official said today the government feels a need to mobilize public opinion on the issue because to much of the public Afghanistan is a remote and unknown country of little previous concern.

One step being considered is a postponement of new loan commitments for large and growing projects in Siberia being jointly developed by the Soviets and private Japanese companies.

The attention centered on three Siberian projects generally approved last September but not yet underway. They are the expansion of a pulp plant, expansion of a port at Vostochny, and a forest development project. Altogether they would cost about $1.2 billion and much of the money would come from Japan's export-import bank.

Government officials ruled out cutting off funds to four other Siberian joint-development projects that already are underway. Even postponing the latest three may not be seriously considered because, according to one government official, the Japanese are more interested in those projects than the Soviets.

The point was underscored by a prominent Japanese businessman, Shigeo Nagano, who is head of the Japan-Soviet economic committee that sponsors the projects. In opposing any postponements, he said Japan must consider its own survival and its need for foreign natural resources.

Any measures seriously interfering with Japan's lucrative trade with the Soviet Union might be similarly disapproved in this country which depends on exports for survival. In 1978, Japan exported $2.5 billion worth of goods to the Soviet Union, about a billion dollars more than was imported from that communist country.

Japan sells computers and other electronic gear to the Soviets, but so far as could be learned today none of it is the type of highly sophisticated equipment the Soviets would sorely miss.