International Court of Justice Hague

Do cases before the ICJ (Hague) have to be submitted by both states in dispute?
I’m currently studying various cases brought before the ICJ and I can’t understand whether both parties in a dispute have to refer their case to the ICJ.
My understanding of the ICJ is that
A. UN bodies can unilaterally ask for an advisory opinion from the ICJ on various issues
B. States can also refer disputes to the ICJ so long as all relevant parties are on board.

Thus far, am I correct?

So, how come Greece unilaterally referred the Aegean dispute to the ICJ without Turkey (1976)? Wasn’t it evident that the case would have been thrown out since Turkey rejected ICJ jurisdiction and didnt refer the case WITH Greece?

How about Nicaragua vs USA 1984? How come Nicaragua unilaterally referred the matter to the ICJ? or didnt it? I doubt if the USA wanted such a case before the ICJ.

What about USA v Iran concerning the hostages?

Does the compulsory jurisdiction clause have something to do with it?

Your help is invaluable!