My jaw crackles every time I open it & won't open fully it feels jammed it hurts my ears, neck & bad headaches I was told it needs surgery is it true?

Maybe not. You need to have a thorough clinical exam with the appropriate studies to determine what is causing the limited opening and pain. There are a number of opinions and non-surgical options for treating TMJ disorders. Surgery is an option, but not usually the first option.
TMJoint. Temporomandibikar joint disease has more than just surgical treatment. Including bite block with sleep. Need to start with dentist and orent.