Note that model contracts or templates for contracts are often sold. Once this was often done in book or pamphlet form -- now it is more likely to be in the form of downloadable digital text, or software packages that assemble the text for a legal document from pre-written sections or fragments, depending on inputs, often the answers to a questionnaire. This helps make it clear that the text of a contract is copyrighted and has a value, but that that value is usually far less than the sums that might be involved in the contract itself. A model contract will often sell for less than $100.
To reuse contract language without the permission of the author (who will often be the copyright holder) is, at least technically, copyright infringement unless one of the exceptions or defenses apply, such as lack of originality or fair use. That said, it is very often done and rarely is anyone sued for it, at least in part because the value of contract text as such is usually too small to justify a suit, particularly if it is copied for a single use, rather than being resold as a new model.
Moreover, many contracts are modifications, often minor modifications, of previous contracts which are in turn modifications of yet earlier ones, and the truly original content may be old enough to be in the public domain, and would be very hard to trace. The value of the original content of the latest modification might be hard to establish.
However, let us consider the fair-use issues, assuming a US jurisdiction. (Never forget that fair-use is a strictly US legal concept.) It is worth reviewing this question and answer from Law SE Consider the four factors for fair use, as listed in 17 USC 107, in the context of the text of a contract:
The purpose and character of the use Writing a contract is generally a commercial action, not an educational one, which would weigh against fair use. Reusing contract language is in no way transformative, which also weighs against fair use. (Contract language remains intended for use as a contract. To copy language for comment in a book analyzing contract law might be trasformative. Analyzing it in a paper about linguistics would surely be transformative.)
the nature of the copyrighted work. The text of a contract does not tend to be creative in the way a work of fiction is, but not as uncreative as a purely factual textbook is. This factor does not seem to weigh strongly in either direction
the amount and substantiality of the portion used in relation to the copyrighted work as a whole. Most often the whole of a contract text will be used, or failing that a very substantial part of it. This factor would weigh against fair use.
the effect of the use upon the potential market for or value of the copyrighted work. If the model used is being marketed as a model, and if many people simply reused it without permission or payment, the effect on the market would be sizable. If the model is simply being used as a contract, and is not being marketed, nor is likely to be, there is really no market to effect. Still if there is any market value at all, copying without permission would significantly affect it. (Note that for this factor, one must judge not the effect of the individual use at issue, but the effect if many people in a similar position made a similar use of the copyrighted work.) This factor has a variable weight, but probably at least leans against fair use.
How a court would asses the overall effect of the four factors if there was a suit over the copyright of the text of a contract, is hard to say. I suspect it woudl not be judged to be fair use. But thew value of the text as text would be low, and contract texts are not usually registered with the Copyright office, unless they are being marketed by a publisher as a model text. Therefore statutory damages might well not be available. Moreover, contract text not being marketed often does not carry a copyright notice, so the defense of innocent infringement might be available to further mitigate damages. Overall I think such suits will continue to be rare, even thoguh the practicve of copying contract language is common.
The question also asks if copying the contract language (no doubt with modifications) would invalidate the new contract. The clear answer is No. The copyright issue is quite separate from the issues involved in the actual contract. Indeed it might well be the lawyer or advisor to one or both of the contracting parties who committe4d infringement, not any of the actual parties. In this regard I have really nothign to add to the previous answer by @Greendrake to this question.