Mechanism for condensation reactions of amino acids
Here is a proposed mechanism in a 2005 paper. One thing to point out is that this is a proposed mechanism but it is all I could find:

link to pdf: https://www.pnas.org/content/pnas/102/35/12395.full.pdf
Typically, these reactions involve the nitrogen attacking the partially positive carbonyl carbon as a form of nucleophilic substitution. However, OH is a bad leaving group so often, reagents such as DCC can be used to make the OH into a good leaving group before reacting. This is why it is easier to make nylon using a diacid chloride instead of a diacid.