A contract is defined under section 2(h) of Indian Contract Act - “An agreement enforceable by law is a contract” which in itself gives us the fact that all contracts have to be an agreement. There will be no contract if there is no agreement.
Whereas all agreements are not contracts because an agreement to become a contract must give rise to a legal obligation. If an agreement is incapable of creating a duty enforceable by law. It is not a contract. Thus an agreement is a wider term than a contract. For example, you make an agreement with your friend that if you do his work then he will be giving you a treat, there is no legal obligation here so it cannot be considered as a contract.