Gate for top of the stairs

jane

I currently have this gate, but doesn't work at all. it is too narrow and danger. I don't have a bin behind the wall to screwed a heavier one there, and the railing is super thin. Any suggestions on what can I do/use?