境 and 端: a border between places and an object's edge
Compare the 境 between two towns with the 端 of a long table, identifying the places or object used as the reference.
A border between two places
境(さかい) means a boundary or border. 「二つの町の境に小さな橋がある。」 says that a small bridge is on the boundary between two towns. 二つの町の identifies the places being divided.
The two towns are the reference in this example. The presence of the bridge does not establish that its entire structure coincides with the boundary or give the boundary's length.
The edge of one object
端(はし) means an end or edge. 「長い机の端に花瓶を置いた。」 describes placing a vase at the end of a long table. 机の identifies the object whose edge is meant.
端 can refer to an edge without specifying a single corner point. The sentence locates the vase at the table's edge; it does not turn that position into the border between two towns.
Read the reference and relationship
The 境 example concerns the space between two places. The 端 example concerns an object's edge. The places sharing a border and the object possessing an end supply the references.
This comparison uses towns and a table as its references. It does not fix every use of the words to two places versus one object or extend the lesson to limits of stamina.
In 「長い机の端に花瓶を置いた。」, does 端 identify a border between two towns or the edge of one object?
Show the answer and why
It identifies the edge of one object, the long table. It locates the vase rather than describing the 境 between towns.

