I have already maxed out on Social Security tax this year from stock compensation income at my prior company. Why did my new employer withhold Social Security tax?
The Social Security withholding by the prior employer does not matter to your new employer. Every company must withhold Social Security tax without considering what an employee's prior company withheld. This can result in Social Security withholding (6.2%) beyond the annual income ceiling of $142,800 in 2021 (it was $137,700 in 2020).
To find out how you can recover the excess amount, and whether you can arrange this as a tax credit or as a refund, see the FAQ on that topic.