(from Google Bard:)
Whether a company can withhold the payment of job severance conditional to a NDA being signed depends on the laws of the state in which the employee works.
In some states, such as California and New York, it is illegal for an employer to withhold severance pay in exchange for an employee's signing of an NDA. In other states, such as Texas and Florida, there is no specific law that prohibits this practice, but it may still be considered unenforceable by the courts.
Even in states where withholding severance pay in exchange for an NDA is not illegal, employers should be careful to do so in a way that is not coercive. For example, an employer should not threaten to withhold severance pay if the employee refuses to sign an NDA.
If you are being asked to sign an NDA in exchange for severance pay, you should carefully review the NDA and consult with an attorney to make sure that it is fair and enforceable. You should also be aware of your rights under the laws of your state.