Read this and answer the question

The United Nations Charter states that treaties must be registered with the UN to be invoked before it or enforced in its judiciary organ, the International Court of Justice. This was done to prevent the proliferation of secret treaties that occurred in the 19th and 20th century. Section 103 of the Charter also states that its members' obligations under it outweigh any competing obligations under other treaties.

Why does the United Nations Charter state that treaties must be registered with the United Nations?
to prevent the proliferation of secret treaties