The words have the same principle and both mean an agreement, but are used in slightly different contexts.
A “treaty” is used between countries to help them come to an agreement.
Whereas a “settlement” is just an official agreement to resolve an issue between people.
As you can see the main difference is who or what is coming to an agreement.
Hope this helps!