For me it was "buy high quality pillow" because you sleep for one thrid of a day etc. I needed a new pillow anyway so I came to the store and bought the best they had. And it was ... ok. Like it's a fine pillow but my sleeping haven't improved really, it's basically the same. So I was disapointed :(
For this situation - my wife and I got coop home goods pillows. Expensive, but sooo worth it. You can add or remove filling from them for firmer or softer, they're not solid memory foam so you won't overheat as easily, and just overall very comfy pillows. A high quality mattress is a great investment too, unfortunately they're expensive. I got a purple mattress 3 or 4 years ago and it ruined regular and memory foam mattresses for me because it's squishy enough to mold to me and be comfy but still give my back support it needs, and is cool enough that I don't overheat. Pillows and mattress were not cheap, but I'd pay double what I did with how much they helped my neck and back at night