Benchy printing

I printed Benchy as my first print however the top part did not finish and the filament turned into spaghetti I’m pretty new to this and have no idea what caused this any explanations?