The key role of the contract is to protect you and the client. Some of them key aspects are delivery time, payment (also what’s included within the payment), NDA/confidentiality clause, termination clause, indemnity etc.
The aim is to be as specific as possible within you contract, so it’s straight forward and non-breakable!
It’s also very dependent on what you serve, your country and the data you deal with. But these are just some of the important ones that would cover me. Consult with a lawyer if you want any specific advice🙂