I need help making the hinge. I've been struggling

This is what I have done

This is what I am trying to make