Most often, the terms used in a written contract are binding on the parties.
And most times, the terms of that written contract will control the obligations of the parties, regardless of what one party or the other ‘meant.’
However, if a party can prove that the written terms of a contract contains a clear mistake and that both parties were aware of that mistake, then that party may argue to a court that the contract should not be enforced as written, but as was intended to be written.
But this is a difficult argument to make in any court, and is often not successful.
As such, in the majority of situations, what is written in a contract is what the parties are obligated to perform.