Use a ligature that won't snap, attach it to something that won't break, tie the knots properly.
But most importantly - make sure that you won't be found for at least an hour. You don't wanna get saved and end up with permanent brain damage.
You could also tie your hands and/or legs so that when the surviwal instinct kicks in you won't be able to free yourself.
Edit: here's a guide, altho it's a bit iffy
https://sanctioned-suicide.net/threads/how-to-hang-yourself.1183/