Keep in mind that in general within WordPress there cannot be Posts or Pages (or other post types) with the same slug (name).
Something that a lot of people forget is that after deleting a Post or Page, it still exists. Only after completely removing the entry, is it really gone and can the slug again be used.
So, if you have a Post with the title “Hello world” and the slug “hello-world”, then that is unique. If you make a new Post with the same title, the slug will automatically become “hello-world-2”.
If you delete the aforementioned Post “Hello world”, but you do not empty the Trash, then a new Post with the same title will again automatically become “hello-world-2”.
Only after deleting and emptying the Trash can you make a new Post “Hello world” with a slug of “hello-world”.
Hope that helps.