Pillows can help but they are not enough. You need to strengthen your neck and shoulder muscles and learn proper posture, sleeping posture is important. You might want to do some PT to learn the various exercises. Read about the McKenzie Method. There are books and YouTube videos. Modern life causes us to bend forward over our chests and this takes a toll on the neck. Learning to keep your head erect and shoulders back will help a lot.
As far as pillows go it's very individual. Something I love will be hell for someone else. I do get killer headaches from neck osteoarthritis and some pillows are definitely better than others.
Right now my favorite is a Jackson roll. It's a little thick at first but now it's a little flatter. Works great for side sleeping. I am 5'2", if you're a different height it might not be as good a fit for you.
If you sleep on your back then you can try a Tri-Core pillow, I like this for when I am reading with my reading wedge. It goes at the top of the wedge behind my head. I also use the Tri-Core when I do yoga nidra meditations, which are typically done lying on your back.
I can't use the Tri-Core for back sleeping because my head rolls to the side. You can use it for side sleeping. But if you want to lie on your back without head rolling then a Mooshi Squish works well.
I have a couple of memory foam pillows, including a contoured Tempur-Pedic and they're just not right. Plus in the winter they're too hard and too soft in the summer.