What is "just"? I would argue that neither side conducted themselves justly during the war. We participated in proxy wars with millions of casualties, supported dictators who were brutal and repressive as long as they renounced communism and actively carried out assassination programs. These are hard to defend from a standpoint of justice.
At the same time, we gave billions in foreign aid, defended South Korea and Western Europe successfully and avoided a nuclear war which would surely have destroyed mankind. So in that sense, US actions in the Cold War were more just.
I would say that the answer is both yes and no.
On the "yes" side, I think that opposing communism was clearly the just thing to do. I do believe that communism, as practiced in places like the USSR and Cuba, is a system that is less just than our democratic and capitalistic system. Not that our system has no flaws, but theirs had more. Many of our specific actions were just as well. Perhaps the best examples of this were the Marshall Plan and the Berlin Airlift.
On the "no" side, we clearly did some unjust things. The overthrows of Mossadeq in Iran and Arbenz in Guatemala were not particularly just. Neither was our support for the apartheid regime in South Africa. We did many things like that where we took security over justice.
Answer to the question "whether the US was just in its conduct" will depend on who is doing the evaluation. Most certainly the adversaries of the USA in the cold war will not consider actions of US just. Also I do not see how this question can be answered meaningfully without considering the Vietnam War, which is one of the most obvious and glaring example of the futility of the waste and destruction caused by US cold war policies.
But even if we overlook the Vietnam war, there are many other actions of US which cannot be justified with the hind sight we have. For example, US played a major role in Osama Bin Laden's rise to power, which among other things led to the 9/11 terrorist strike. I do not see how can such actions be justified by anyone including people sympathetic to the US interests.
Thus while the US may have been fully justified in its cold war goals of opposing spread of communism, I am not so sure if it can justify all the methods it used for doing so.