You don't get promoted by staying at a company. You get promoted by leaving for companies who value you more.
Btw, I'm not bragging. I'm still just barely on the right side of the bell curve as far as salary for my local market. It's just that salary compression is real. Companies would rather lose employees and pay their replacements T market rate than pay to keep good employees.
True, if they only need junior developers and you've worked your way up to be a senior dev as far as skill set, you may be more than the company needs.