For maximum comfort, while sleeping and preventing neck pain, your pillow height or thickness should be such that it creates a straight line from your head, neck, and to the bottom of the spine. For it, your pillows should not be too thick.
A thumb rule to deciding pillow height is keeping your ears vertically stacked over each other.