The trap I used for it was 3x3 stone foundation, then doorways all around the trap, two walls high. Then you place a ramp and lead it in, it worked perfectly for me.

More Spinosaurus Taming & KO Tips