I recommend using a bear trap then trap it in a 4by4 with some door ways on the side btw use anything wood+

More Megalosaurus Taming & KO Tips