Career building rule number one...Never, EVER, accept a counter offer from your current employer.
You may win a little short term but you will lose far more long term. Once you accept a counter offer, you have become a disloyal mercenary in their eyes and they will drastically curtail anything they do for you in the future.
A new employer with a better offer won’t have such bias and you will do far better long term.
Trust the guy with 33 years of career building experience that has risen 20 levels and doubled his salary 5 times going from lab assistant to Senior Vice President. I now make 25x what I did when I started.