I don't remember that either the United States or Japan did anything to reduce civilian casualties when Japan invaded China,
In 1931 or 1937?
The US reaction was pretty strong. By the international standards of the time, the initial oil embargo and then near total trade embargo with Japan were strident indeed. The US also created the Stimson Doctrine in response, which denied official recognition of regions annexed by force. Then there was all the actions that the US undertook concerning the fighting in the League of Nations - actions which contributed to Japan's departure from the organisation.
By which time the realities of the war and the recognition of the technical limitations of air power at the time meant that any adherence to the 'Roosevelt Rules' - which had demanded that all belligerents refrain from bombing civilians - had evaporated.
The US went into the conflicts of the mid to late 1930s with the conception that civilian casualties should be avoided at all costs. This naivety promptly evaporated after Pearl Harbour, although there were lingering strains of resistance in many echelons of US society all the way through the war.
But then no one cared about China in the late 1930s,
I really suggest that you read up on the history of the period. The Japanese occupation of Manchuria and then it's 1937 invasion caused a HUGE amount of international upset.
The US approach was formally one of strict neutrality - in keeping with the terms of the Neutrality Act, the Roosevelt government really didn't want to be seen favouring any side. However, there was huge outcry among the US population from late 1937 on (not helped by the Japanese sinking a US patrol ship, or coverage from Nanking).
and the United States did not have civilian casualties in mind when they went to war against the Japanese and finally dropped nuclear bombs on two Japanese cities
Well, they did. The US went from demanding belligerents avoid targeting civilians, to deliberately firebombing Japanese cities. The "dehousing" as it was euphemistically known, was intentional.
Also, when the Arab states attacked Israel during the 6 day and Yom Kippor wars, we didn't hear the United Nations demanding a ceasefire.
Again, check your history.
The UN called for a ceasefire within 48 hours of the start of the Six Day War. For the Yom Kippur war, the UN immediately started diplomatic efforts towards a ceasefire, but only managed to formally broker deal 16 days in, as outlined under Resolution 338.
It may have been when Israel was getting the upper hand and defeating the Arabs, that the United Nations would have demanded a cease fire. Why would they? To protect the Arabs, even though the Arabs started the two wars.
You really need to read up on your history.