Did the UN have the right to create the state of Israel in the first place ?

The UN did not create Israel. This is a popular misconception. The United Nations suggested a non-binding partition plan that was never implemented. Furthermore, the United Nations, both its General Assembly as well as its Security Council do not have the jurisdiction to impose political solutions, especially without the consent of those it affects.
Israel was established not through the UN, but through warfare and the creation of facts on the ground. Facts it created through the destruction and ethnic cleansing of hundreds of Palestinian villages and communities.