Usually, if you stay in a company for a long time and the salary increase can't keep up with the market rhythm, you need a headhunter to help you make an evaluation and know your market value by comparing it with other companies' versions.
As far as you are concerned, good birds choose wood to live in, and recruiting people is the highest bidder.