This is up to the discretion of the GM.
So 2020 the salary cap was just under $200M. How did KC sign Mahomes to a $45M 10 year deal? That is 22.5%.
You are correct. It is up to the discretion of the GM.
My point is that usually a union negotiates contracts. Take a teacher's union for example. A teacher that has 10 years of experience with a master's degree makes X. A teacher with 5 years experience and a master's degree makes less than X. Each individual teacher does not negotiate their salary. It is done collectively.
With that said, it makes sense to me for the NFL player's union to say that a QB with 5 years experience makes X. A QB with 5 years experience and an MVP (or whatever metric) makes a little more than X. This would ensure the money is divided up more or less equally amongst all the players which is who the NFL player's union represents.
I don't have a lot of experience with unions that allow workers to negotiate salary individually, though I am sure they do exist.